public class AdminServer extends java.lang.Object implements ContainerRepository, org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>, org.springframework.beans.factory.DisposableBean
Paths.ADMIN
znode so that one of
them will take over leadership if the leader admin closes or crashes.Modifier and Type | Class and Description |
---|---|
class |
AdminServer.ContainerConverter
Converts a
ChildData node to a Container . |
Constructor and Description |
---|
AdminServer(ZooKeeperConnection zkConnection,
StreamDefinitionRepository streamDefinitionRepository,
ModuleDefinitionRepository moduleDefinitionRepository,
ModuleOptionsMetadataResolver moduleOptionsMetadataResolver)
Construct an AdminServer.
|
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
java.util.Iterator<Container> |
getContainerIterator()
Return an
Iterator over the available containers. |
void |
onApplicationEvent(org.springframework.context.ApplicationEvent event) |
public AdminServer(ZooKeeperConnection zkConnection, StreamDefinitionRepository streamDefinitionRepository, ModuleDefinitionRepository moduleDefinitionRepository, ModuleOptionsMetadataResolver moduleOptionsMetadataResolver)
zkConnection
- ZooKeeper connectionstreamDefinitionRepository
- repository for streamsmoduleDefinitionRepository
- repository for modulesmoduleOptionsMetadataResolver
- resolver for module options metadatapublic void onApplicationEvent(org.springframework.context.ApplicationEvent event)
onApplicationEvent
in interface org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>
public java.util.Iterator<Container> getContainerIterator()
Iterator
over the available containers.getContainerIterator
in interface ContainerRepository
public void destroy()
destroy
in interface org.springframework.beans.factory.DisposableBean