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.SplitBrainMergeCheckResult |
sendSplitBrainJoinMessageAndCheckResponse(Address target,
SplitBrainJoinMessage request)
Sends a split brain join request to the target address and checks the response to see if this node should merge
to the target address.
|
void |
setTargetAddress(Address targetAddress) |
protected boolean |
shouldRetry() |
protected void |
startClusterMerge(Address targetAddress,
int expectedMemberListVersion) |
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 final SplitBrainJoinMessage.SplitBrainMergeCheckResult sendSplitBrainJoinMessageAndCheckResponse(Address target, SplitBrainJoinMessage request)
protected void startClusterMerge(Address targetAddress, int expectedMemberListVersion)
protected Address getTargetAddress()
Copyright © 2019 Hazelcast, Inc.. All Rights Reserved.