org.elasticsearch.discovery.jgroups
Class JgroupsDiscovery
java.lang.Object
org.elasticsearch.util.component.AbstractComponent
org.elasticsearch.util.component.AbstractLifecycleComponent<Discovery>
org.elasticsearch.discovery.jgroups.JgroupsDiscovery
- All Implemented Interfaces:
- Discovery, CloseableComponent, LifecycleComponent<Discovery>, org.jgroups.MembershipListener, org.jgroups.MessageListener, org.jgroups.Receiver
public class JgroupsDiscovery
- extends AbstractLifecycleComponent<Discovery>
- implements Discovery, org.jgroups.Receiver
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JgroupsDiscovery
@Inject
public JgroupsDiscovery(Settings settings,
Environment environment,
ClusterName clusterName,
TransportService transportService,
ClusterService clusterService)
addListener
public void addListener(InitialStateDiscoveryListener listener)
- Specified by:
addListener
in interface Discovery
removeListener
public void removeListener(InitialStateDiscoveryListener listener)
- Specified by:
removeListener
in interface Discovery
doStart
protected void doStart()
throws ElasticSearchException
- Specified by:
doStart
in class AbstractLifecycleComponent<Discovery>
- Throws:
ElasticSearchException
doStop
protected void doStop()
throws ElasticSearchException
- Specified by:
doStop
in class AbstractLifecycleComponent<Discovery>
- Throws:
ElasticSearchException
doClose
protected void doClose()
throws ElasticSearchException
- Specified by:
doClose
in class AbstractLifecycleComponent<Discovery>
- Throws:
ElasticSearchException
nodeDescription
public java.lang.String nodeDescription()
- Specified by:
nodeDescription
in interface Discovery
firstMaster
public boolean firstMaster()
- Description copied from interface:
Discovery
- Is the discovery of this node caused this node to be the first master in the cluster.
- Specified by:
firstMaster
in interface Discovery
publish
public void publish(ClusterState clusterState)
- Description copied from interface:
Discovery
- Publish all the changes to the cluster from the master (can be called just by the master). The publish
process should not publish this state to the master as well! (the master is sending it...).
- Specified by:
publish
in interface Discovery
receive
public void receive(org.jgroups.Message msg)
- Specified by:
receive
in interface org.jgroups.MessageListener
getState
public byte[] getState()
- Specified by:
getState
in interface org.jgroups.MessageListener
setState
public void setState(byte[] state)
- Specified by:
setState
in interface org.jgroups.MessageListener
viewAccepted
public void viewAccepted(org.jgroups.View newView)
- Specified by:
viewAccepted
in interface org.jgroups.MembershipListener
suspect
public void suspect(org.jgroups.Address suspectedMember)
- Specified by:
suspect
in interface org.jgroups.MembershipListener
block
public void block()
- Specified by:
block
in interface org.jgroups.MembershipListener