public class ContainerRegistrar
extends java.lang.Object
implements org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>, org.springframework.context.ApplicationContextAware
ZooKeeperConnection
が閉じられると、その一時ノードはすぐに削除されます。ZooKeeperConnection
のライフサイクルは通常 Spring によって管理されるため、所有する ApplicationContext
自体が閉じられている場合はこれが通常の動作になります。コンストラクターと説明 |
---|
ContainerRegistrar(ZooKeeperConnection zkConnection, ContainerAttributes containerAttributes, ContainerRepository containerRepository, org.springframework.xd.dirt.server.container.DeploymentListener deploymentListener) 基礎となる ZooKeeperConnection が確立されるたびに、提供された ContainerAttributes を登録するインスタンスを作成します。 |
修飾子と型 | メソッドと説明 |
---|---|
void | onApplicationEvent(org.springframework.context.ApplicationEvent event) |
void | setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
public ContainerRegistrar(ZooKeeperConnection zkConnection, ContainerAttributes containerAttributes, ContainerRepository containerRepository, org.springframework.xd.dirt.server.container.DeploymentListener deploymentListener)
ZooKeeperConnection
が確立されるたびに、提供された ContainerAttributes
を登録するインスタンスを作成します。このインスタンスが ContextRefreshedEvent
を受信した時点でその接続がすでに確立されている場合は、そのときに属性が登録されます。それ以外の場合は、接続イベントと再接続イベントに対して呼び出されるコールバック内で登録が行われます。containerAttributes
- コンテナーのランタイム属性と構成属性 containerRepository
- コンテナーのリポジトリ zkConnection
- ZooKeeper 接続 public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
org.springframework.context.ApplicationContextAware
の setApplicationContext
org.springframework.beans.BeansException
public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>
の onApplicationEvent