public abstract class AbstractJoiner extends Object implements Joiner
Modifier and Type | Field and Description |
---|---|
protected ConcurrentMap<Address,Boolean> |
blacklistedAddresses |
protected ClusterJoinManager |
clusterJoinManager |
protected ClusterServiceImpl |
clusterService |
protected Config |
config |
protected ILogger |
logger |
protected Node |
node |
Constructor and Description |
---|
AbstractJoiner(Node node) |
Modifier and Type | Method and Description |
---|---|
void |
blacklist(Address address,
boolean permanent)
Adds an address to the blacklist.
|
abstract void |
doJoin() |
protected long |
getMaxJoinMillis() |
protected long |
getMaxJoinTimeToMasterNode() |
long |
getStartTime() |
protected Address |
getTargetAddress() |
boolean |
isBlacklisted(Address address)
Checks if an address is blacklisted.
|
void |
join() |
void |
reset() |
protected SplitBrainJoinMessage |
sendSplitBrainJoinMessage(Address target) |
void |
setTargetAddress(Address targetAddress) |
protected SplitBrainJoinMessage.SplitBrainMergeCheckResult |
shouldMerge(SplitBrainJoinMessage joinMessage)
Checks split-brain join response and returns the merge check result whether or not this node should
join to the target.
|
protected boolean |
shouldRetry() |
protected void |
startClusterMerge(Address targetAddress) |
boolean |
unblacklist(Address address)
Removes an address from the blacklist if it is temporarily blacklisted.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getType, searchForOtherClusters
protected final Config config
protected final Node node
protected final ClusterServiceImpl clusterService
protected final ILogger logger
protected final ConcurrentMap<Address,Boolean> blacklistedAddresses
protected final ClusterJoinManager clusterJoinManager
public AbstractJoiner(Node node)
public final long getStartTime()
getStartTime
in interface Joiner
public void setTargetAddress(Address targetAddress)
setTargetAddress
in interface Joiner
public void blacklist(Address address, boolean permanent)
Joiner
Joiner.unblacklist(com.hazelcast.nio.Address)
.
Method is thread-safe.
If the address already is blacklisted, the call is ignoredblacklist
in interface Joiner
address
- the address to blacklist.permanent
- true if blacklist is permanent, false if not.Joiner.isBlacklisted(com.hazelcast.nio.Address)
public boolean unblacklist(Address address)
Joiner
unblacklist
in interface Joiner
address
- the address to unblacklist.public boolean isBlacklisted(Address address)
Joiner
isBlacklisted
in interface Joiner
address
- the address to check.Joiner.blacklist(com.hazelcast.nio.Address, boolean)
public abstract void doJoin()
protected final boolean shouldRetry()
protected final long getMaxJoinMillis()
protected final long getMaxJoinTimeToMasterNode()
protected SplitBrainJoinMessage.SplitBrainMergeCheckResult shouldMerge(SplitBrainJoinMessage joinMessage)
protected SplitBrainJoinMessage sendSplitBrainJoinMessage(Address target)
protected void startClusterMerge(Address targetAddress)
protected Address getTargetAddress()
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.