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 |
lifecycle
componentSettings, 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 |
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
public 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)
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 DiscoveryNodes nodes()
PingContextProvider
implementationnodes
in interface DiscoveryNodesProvider
public NodeService nodeService()
nodeService
in interface DiscoveryNodesProvider
public boolean nodeHasJoinedClusterOnce()
PingContextProvider
nodeHasJoinedClusterOnce
in interface PingContextProvider
public void publish(ClusterState clusterState, Discovery.AckListener ackListener)
PingContextProvider
implementationpublic boolean joiningCluster()
Copyright © 2009–2015. All rights reserved.