public final class DistributedStreamCoordinatorClient extends AbstractStreamCoordinatorClient
StreamCoordinatorClient uses ZooKeeper to implementation coordination needed for stream. It also uses a
ResourceCoordinator to elect each handler as the leader of a set of streams.| Constructor and Description |
|---|
DistributedStreamCoordinatorClient(ZKClient zkClient) |
| Modifier and Type | Method and Description |
|---|---|
protected <T> PropertyStore<T> |
createPropertyStore(Codec<T> codec)
Creates a
PropertyStore. |
protected void |
doShutDown()
Stops the service.
|
protected void |
doStartUp()
Starts the service.
|
protected Lock |
getLock(Id.Stream streamId)
Returns a
Lock for performing exclusive operation for the given stream. |
protected void |
streamCreated(Id.Stream streamId)
Gets invoked when a stream of the given name is created.
|
protected void |
streamDeleted(Id.Stream streamId)
Gets invoked when a stream is deleted.
|
addListener, createStream, deleteStream, exclusiveAction, shutDown, startUp, updatePropertiesaddListener, executor, isRunning, start, startAndWait, state, stop, stopAndWait, toString@Inject public DistributedStreamCoordinatorClient(ZKClient zkClient)
protected void doStartUp()
throws Exception
AbstractStreamCoordinatorClientdoStartUp in class AbstractStreamCoordinatorClientException - when starting of the service failedprotected void doShutDown()
throws Exception
AbstractStreamCoordinatorClientdoShutDown in class AbstractStreamCoordinatorClientException - when stopping the service could not be performedprotected <T> PropertyStore<T> createPropertyStore(Codec<T> codec)
AbstractStreamCoordinatorClientPropertyStore.createPropertyStore in class AbstractStreamCoordinatorClientT - Type of the propertycodec - Codec for the property stored in the property storePropertyStore.protected Lock getLock(Id.Stream streamId)
AbstractStreamCoordinatorClientLock for performing exclusive operation for the given stream.getLock in class AbstractStreamCoordinatorClientprotected void streamCreated(Id.Stream streamId)
AbstractStreamCoordinatorClientstreamCreated in class AbstractStreamCoordinatorClientprotected void streamDeleted(Id.Stream streamId)
AbstractStreamCoordinatorClientstreamDeleted in class AbstractStreamCoordinatorClientCopyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.