com.hazelcast.cluster.impl
Class AbstractJoiner
java.lang.Object
com.hazelcast.cluster.impl.AbstractJoiner
- All Implemented Interfaces:
- Joiner
- Direct Known Subclasses:
- MulticastJoiner, TcpIpJoiner
public abstract class AbstractJoiner
- extends Object
- implements Joiner
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
blacklistedAddresses
protected final ConcurrentMap<Address,Boolean> blacklistedAddresses
config
protected final Config config
node
protected final Node node
logger
protected final ILogger logger
AbstractJoiner
public AbstractJoiner(Node node)
blacklist
public void blacklist(Address address,
boolean permanent)
- Description copied from interface:
Joiner
- Adds an address to the blacklist. Blacklist is useful if a node should ignore another node, e.g. when
the groupname of 2 machines is not the same and they should form different clusters.
If blacklist is permanent, then this operation is write-once. It cannot be unblacklisted again.
If blacklist is temporary, blacklist can be removed via
Joiner.unblacklist(com.hazelcast.nio.Address)
.
Method is thread-safe.
If the address already is blacklisted, the call is ignored
- Specified by:
blacklist
in interface Joiner
- Parameters:
address
- the address to blacklist.permanent
- if blacklist is permanent or not- See Also:
Joiner.isBlacklisted(com.hazelcast.nio.Address)
unblacklist
public boolean unblacklist(Address address)
- Description copied from interface:
Joiner
- Removes an address from the blacklist if it's temporarily blacklisted.
This method has no effect if given address is not blacklisted. Permanent blacklists
cannot be undone.
Method is thread-safe.
If the address is not blacklisted, the call is ignored.
- Specified by:
unblacklist
in interface Joiner
- Parameters:
address
- the address to unblacklist.
- Returns:
- true if address is unblacklisted, false otherwise.
isBlacklisted
public boolean isBlacklisted(Address address)
- Description copied from interface:
Joiner
- Checks if an address is blacklisted.
Method is thread-safe.
- Specified by:
isBlacklisted
in interface Joiner
- Parameters:
address
- the address to check.
- Returns:
- true if blacklisted, false otherwise.
- See Also:
Joiner.blacklist(com.hazelcast.nio.Address, boolean)
doJoin
public abstract void doJoin()
join
public final void join()
- Specified by:
join
in interface Joiner
getMaxJoinMillis
protected final long getMaxJoinMillis()
getMaxJoinTimeToMasterNode
protected final long getMaxJoinTimeToMasterNode()
reset
public void reset()
- Specified by:
reset
in interface Joiner
startClusterMerge
protected void startClusterMerge(Address targetAddress)
getStartTime
public final long getStartTime()
- Specified by:
getStartTime
in interface Joiner
setTargetAddress
public void setTargetAddress(Address targetAddress)
- Specified by:
setTargetAddress
in interface Joiner
getTargetAddress
public Address getTargetAddress()
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.