public class DiscoveryService extends AbstractLifecycleComponent<DiscoveryService>
Modifier and Type | Field and Description |
---|---|
static String |
SETTING_INITIAL_STATE_TIMEOUT |
lifecycle
componentSettings, logger, settings
Constructor and Description |
---|
DiscoveryService(Settings settings,
DiscoverySettings discoverySettings,
Discovery discovery) |
Modifier and Type | Method and Description |
---|---|
protected void |
doClose() |
protected void |
doStart() |
protected void |
doStop() |
static String |
generateNodeId(Settings settings) |
ClusterBlock |
getNoMasterBlock() |
boolean |
initialStateReceived()
Returns true if the initial state was received within the timeout waiting for it
on
doStart() . |
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 |
waitForInitialState() |
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stop
nodeName
public static final String SETTING_INITIAL_STATE_TIMEOUT
@Inject public DiscoveryService(Settings settings, DiscoverySettings discoverySettings, Discovery discovery)
public ClusterBlock getNoMasterBlock()
protected void doStart() throws ElasticsearchException
doStart
in class AbstractLifecycleComponent<DiscoveryService>
ElasticsearchException
public void waitForInitialState()
protected void doStop() throws ElasticsearchException
doStop
in class AbstractLifecycleComponent<DiscoveryService>
ElasticsearchException
protected void doClose() throws ElasticsearchException
doClose
in class AbstractLifecycleComponent<DiscoveryService>
ElasticsearchException
public DiscoveryNode localNode()
public boolean initialStateReceived()
doStart()
.public String nodeDescription()
public void publish(ClusterState clusterState, Discovery.AckListener ackListener)
Discovery.AckListener
allows to acknowledge the publish
event based on the response gotten from all nodesCopyright © 2009–2015. All rights reserved.