public class LocalClusterCoordinator extends ClusterCoordinator
Modifier and Type | Class and Description |
---|---|
class |
LocalClusterCoordinator.LocalSemaphore |
ClusterCoordinator.RegistrationHandle
listeners
Constructor and Description |
---|
LocalClusterCoordinator() |
addDrillbitStatusListener, drillbitRegistered, drillbitUnregistered, isDrillbitInState, removeDrillbitStatusListener
public void start(long millis) throws Exception
ClusterCoordinator
start
in class ClusterCoordinator
millis
- The maximum time to wait before throwing an exception if the
cluster coordination service has not successfully started. Use 0
to wait indefinitely.Exception
- in case when unable to start coordinatorpublic ClusterCoordinator.RegistrationHandle register(CoordinationProtos.DrillbitEndpoint data)
register
in class ClusterCoordinator
public void unregister(ClusterCoordinator.RegistrationHandle handle)
unregister
in class ClusterCoordinator
public ClusterCoordinator.RegistrationHandle update(ClusterCoordinator.RegistrationHandle handle, CoordinationProtos.DrillbitEndpoint.State state)
update
in class ClusterCoordinator
public Collection<CoordinationProtos.DrillbitEndpoint> getAvailableEndpoints()
ClusterCoordinator
getAvailableEndpoints
in class ClusterCoordinator
public Collection<CoordinationProtos.DrillbitEndpoint> getOnlineEndPoints()
getOnlineEndPoints
in class ClusterCoordinator
public DistributedSemaphore getSemaphore(String name, int maximumLeases)
getSemaphore
in class ClusterCoordinator
public <V> TransientStore<V> getOrCreateTransientStore(TransientStoreConfig<V> config)
ClusterCoordinator
store
instance with the given configuration
.
Note that implementor might cache the instance so new instance creation is not guaranteed.getOrCreateTransientStore
in class ClusterCoordinator
V
- value type for this storeconfig
- store configurationCopyright © 1970 The Apache Software Foundation. All rights reserved.