public class LocalDiscovery extends AbstractLifecycleComponent<Discovery> implements Discovery
Discovery.AckListener
lifecycle
componentSettings, logger, settings
Constructor and Description |
---|
LocalDiscovery(Settings settings,
ClusterName clusterName,
TransportService transportService,
ClusterService clusterService,
DiscoveryNodeService discoveryNodeService,
Version version,
DiscoverySettings discoverySettings) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(InitialStateDiscoveryListener listener) |
protected void |
doClose() |
protected void |
doStart() |
protected void |
doStop() |
DiscoveryNode |
localNode() |
String |
nodeDescription() |
void |
publish(ClusterState clusterState,
Discovery.AckListener ackListener)
Publish all the changes to the cluster from the master (can be called just by the master).
|
void |
removeListener(InitialStateDiscoveryListener listener) |
void |
setAllocationService(AllocationService allocationService)
Another hack to solve dep injection problem..., note, this will be called before
any start is called.
|
void |
setNodeService(NodeService nodeService)
Here as a hack to solve dep injection problem...
|
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stop
nodeName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addLifecycleListener, lifecycleState, removeLifecycleListener, start, stop
close
@Inject public LocalDiscovery(Settings settings, ClusterName clusterName, TransportService transportService, ClusterService clusterService, DiscoveryNodeService discoveryNodeService, Version version, DiscoverySettings discoverySettings)
public void setNodeService(@Nullable NodeService nodeService)
Discovery
setNodeService
in interface Discovery
public void setAllocationService(AllocationService allocationService)
Discovery
setAllocationService
in interface Discovery
protected void doStart() throws ElasticsearchException
doStart
in class AbstractLifecycleComponent<Discovery>
ElasticsearchException
protected void doStop() throws ElasticsearchException
doStop
in class AbstractLifecycleComponent<Discovery>
ElasticsearchException
protected void doClose() throws ElasticsearchException
doClose
in class AbstractLifecycleComponent<Discovery>
ElasticsearchException
public DiscoveryNode localNode()
public void addListener(InitialStateDiscoveryListener listener)
addListener
in interface Discovery
public void removeListener(InitialStateDiscoveryListener listener)
removeListener
in interface Discovery
public String nodeDescription()
nodeDescription
in interface Discovery
public void publish(ClusterState clusterState, Discovery.AckListener ackListener)
Discovery
Discovery.AckListener
allows to keep track of the ack received from nodes, and verify whether
they updated their own cluster state or not.Copyright © 2009–2015. All rights reserved.