java.lang.Object
org.elasticsearch.discovery.PeerFinder
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionPeerFinder(Settings settings, TransportService transportService, TransportAddressConnector transportAddressConnector, ConfiguredHostsResolver configuredHostsResolver) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidactivate(DiscoveryNodes lastAcceptedNodes) voiddeactivate(DiscoveryNode leader) longprotected final booleanprotected abstract voidonActiveMasterFound(DiscoveryNode masterNode, long term) Invoked on receipt of a PeersResponse from a node that believes it's an active leader, which this node should therefore try and join.protected abstract voidInvoked when the set of found peers changes.voidsetCurrentTerm(long currentTerm) protected voidstartProbe(TransportAddress transportAddress) 
- 
Field Details- 
REQUEST_PEERS_ACTION_NAME- See Also:
 
- 
DISCOVERY_FIND_PEERS_INTERVAL_SETTING
- 
DISCOVERY_REQUEST_PEERS_TIMEOUT_SETTING
- 
VERBOSITY_INCREASE_TIMEOUT_SETTING
 
- 
- 
Constructor Details- 
PeerFinderpublic PeerFinder(Settings settings, TransportService transportService, TransportAddressConnector transportAddressConnector, ConfiguredHostsResolver configuredHostsResolver) 
 
- 
- 
Method Details- 
activate
- 
deactivate
- 
holdsLockprotected final boolean holdsLock()
- 
getLeader
- 
getCurrentTermpublic long getCurrentTerm()
- 
setCurrentTermpublic void setCurrentTerm(long currentTerm) 
- 
onActiveMasterFoundInvoked on receipt of a PeersResponse from a node that believes it's an active leader, which this node should therefore try and join. Note that invocations of this method are not synchronised. By the time it is called we may have been deactivated.
- 
onFoundPeersUpdatedprotected abstract void onFoundPeersUpdated()Invoked when the set of found peers changes. Note that invocations of this method are not fully synchronised, so we only guarantee that the change to the set of found peers happens before this method is invoked. If there are multiple concurrent changes then there will be multiple concurrent invocations of this method, with no guarantee as to their order. For this reason we do not pass the updated set of peers as an argument to this method, leaving it to the implementation to call getFoundPeers() with appropriate synchronisation to avoid lost updates. Also, by the time this method is invoked we may have been deactivated.
- 
getLastResolvedAddresses
- 
getFoundPeers
- 
startProbe
 
-