public class ZenDiscovery extends AbstractLifecycleComponent<Discovery> implements Discovery, PingContextProvider
Discovery.AckListener| Modifier and Type | Field and Description |
|---|---|
static String |
DISCOVERY_REJOIN_ACTION_NAME |
static String |
SETTING_JOIN_RETRY_ATTEMPTS |
static String |
SETTING_JOIN_RETRY_DELAY |
static String |
SETTING_JOIN_TIMEOUT |
static String |
SETTING_MASTER_ELECTION_FILTER_CLIENT |
static String |
SETTING_MASTER_ELECTION_FILTER_DATA |
static String |
SETTING_MAX_PINGS_FROM_ANOTHER_MASTER |
static String |
SETTING_PING_TIMEOUT |
static String |
SETTING_REJOIN_ON_MASTER_GONE |
static String |
SETTING_SEND_LEAVE_REQUEST |
lifecyclecomponentSettings, logger, settings| Constructor and Description |
|---|
ZenDiscovery(Settings settings,
ClusterName clusterName,
ThreadPool threadPool,
TransportService transportService,
ClusterService clusterService,
NodeSettingsService nodeSettingsService,
DiscoveryNodeService discoveryNodeService,
ZenPingService pingService,
ElectMasterService electMasterService,
DiscoverySettings discoverySettings,
DynamicSettings dynamicSettings) |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(InitialStateDiscoveryListener listener) |
protected void |
doClose() |
protected void |
doStart() |
protected void |
doStop() |
boolean |
joiningCluster()
returns true if zen discovery is started and there is a currently a background thread active for (re)joining
the cluster used for testing.
|
DiscoveryNode |
localNode() |
String |
nodeDescription() |
boolean |
nodeHasJoinedClusterOnce()
return true if this node has previously joined the cluster at least once.
|
DiscoveryNodes |
nodes()
start of
PingContextProvider implementation |
NodeService |
nodeService() |
void |
publish(ClusterState clusterState,
Discovery.AckListener ackListener)
end of
PingContextProvider implementation |
void |
removeListener(InitialStateDiscoveryListener listener) |
void |
setNodeService(NodeService nodeService)
Here as a hack to solve dep injection problem...
|
void |
setRoutingService(RoutingService routingService)
Another hack to solve dep injection problem..., note, this will be called before
any start is called.
|
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stopnodeNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddLifecycleListener, lifecycleState, removeLifecycleListener, start, stopclosepublic static final String SETTING_REJOIN_ON_MASTER_GONE
public static final String SETTING_PING_TIMEOUT
public static final String SETTING_JOIN_TIMEOUT
public static final String SETTING_JOIN_RETRY_ATTEMPTS
public static final String SETTING_JOIN_RETRY_DELAY
public static final String SETTING_MAX_PINGS_FROM_ANOTHER_MASTER
public static final String SETTING_SEND_LEAVE_REQUEST
public static final String SETTING_MASTER_ELECTION_FILTER_CLIENT
public static final String SETTING_MASTER_ELECTION_FILTER_DATA
public static final String DISCOVERY_REJOIN_ACTION_NAME
@Inject public ZenDiscovery(Settings settings, ClusterName clusterName, ThreadPool threadPool, TransportService transportService, ClusterService clusterService, NodeSettingsService nodeSettingsService, DiscoveryNodeService discoveryNodeService, ZenPingService pingService, ElectMasterService electMasterService, DiscoverySettings discoverySettings, @ClusterDynamicSettings DynamicSettings dynamicSettings)
public void setNodeService(@Nullable NodeService nodeService)
DiscoverysetNodeService in interface Discoverypublic void setRoutingService(RoutingService routingService)
DiscoverysetRoutingService in interface Discoveryprotected void doStart()
throws ElasticsearchException
doStart in class AbstractLifecycleComponent<Discovery>ElasticsearchExceptionprotected void doStop()
throws ElasticsearchException
doStop in class AbstractLifecycleComponent<Discovery>ElasticsearchExceptionprotected void doClose()
throws ElasticsearchException
doClose in class AbstractLifecycleComponent<Discovery>ElasticsearchExceptionpublic DiscoveryNode localNode()
public void addListener(InitialStateDiscoveryListener listener)
addListener in interface Discoverypublic void removeListener(InitialStateDiscoveryListener listener)
removeListener in interface Discoverypublic String nodeDescription()
nodeDescription in interface Discoverypublic DiscoveryNodes nodes()
PingContextProvider implementationnodes in interface DiscoveryNodesProviderpublic NodeService nodeService()
nodeService in interface DiscoveryNodesProviderpublic boolean nodeHasJoinedClusterOnce()
PingContextProvidernodeHasJoinedClusterOnce in interface PingContextProviderpublic void publish(ClusterState clusterState, Discovery.AckListener ackListener)
PingContextProvider implementationpublic boolean joiningCluster()
Copyright © 2009–2016. All rights reserved.