public class GridCacheMvccCandidate extends Object implements Externalizable, Comparable<GridCacheMvccCandidate>
| Constructor and Description |
|---|
GridCacheMvccCandidate()
Empty constructor required by
Externalizable. |
GridCacheMvccCandidate(GridCacheEntryEx parent,
UUID nodeId,
UUID otherNodeId,
GridCacheVersion otherVer,
long threadId,
GridCacheVersion ver,
long timeout,
boolean loc,
boolean reentry,
boolean tx,
boolean singleImplicit,
boolean nearLoc,
boolean dhtLoc) |
public GridCacheMvccCandidate()
Externalizable.public GridCacheMvccCandidate(GridCacheEntryEx parent, UUID nodeId, @Nullable UUID otherNodeId, @Nullable GridCacheVersion otherVer, long threadId, GridCacheVersion ver, long timeout, boolean loc, boolean reentry, boolean tx, boolean singleImplicit, boolean nearLoc, boolean dhtLoc)
parent - Parent entry.nodeId - Requesting node ID.otherNodeId - Near node ID.otherVer - Other version.threadId - Requesting thread ID.ver - Cache version.timeout - Maximum wait time.loc - True if the lock is local.reentry - True if candidate is for reentry.tx - Transaction flag.singleImplicit - Single-key-implicit-transaction flag.nearLoc - Near-local flag.dhtLoc - DHT local flag.public short flags()
public <V> GridCacheEntryEx parent()
public AffinityTopologyVersion topologyVersion()
public void topologyVersion(AffinityTopologyVersion topVer)
topVer - Topology version.public GridCacheMvccCandidate reenter()
@Nullable public GridCacheMvccCandidate unenter()
null.public void parent(GridCacheEntryEx parent)
parent - Sets locks parent entry.public UUID nodeId()
public UUID otherNodeId()
public void otherNodeId(UUID otherNodeId)
otherNodeId - Near or DHT node ID.public Collection<ClusterNode> mappedDhtNodes()
public Collection<ClusterNode> mappedNearNodes()
public void mappedNodeIds(Collection<ClusterNode> mappedDhtNodes, Collection<ClusterNode> mappedNearNodes)
mappedDhtNodes - Mapped DHT node IDs.public void removeMappedNode(ClusterNode node)
node - Node to remove.public GridCacheVersion otherVersion()
public boolean otherVersion(GridCacheVersion otherVer)
otherVer is near local candidate version.
For near local candidates otherVer is dht mapped candidate version.otherVer - Alternative candidate version.True if other version was set, false if other version is already set.public boolean ownerVersion(GridCacheVersion ownerVer)
ownerVer - Version of owned candidate by the moment this candidate was added.True if owned version was set, false otherwise.@Nullable public GridCacheVersion ownerVersion()
null
if there were no owned candidates.public long threadId()
Thread.getId()public GridCacheVersion version()
public long timeout()
public long timestamp()
public boolean local()
True if lock is local.public boolean tx()
True if transaction flag is set.public boolean singleImplicit()
True if implicit transaction.public boolean nearLocal()
public boolean dhtLocal()
public boolean reentry()
True if this candidate is a reentry.public void setReentry()
public boolean ready()
public void setReady()
public boolean used()
True if lock was released.public void setUsed()
public boolean removed()
public void setRemoved()
public boolean owner()
True if is or was an owner.public void setOwner()
@Nullable public GridCacheMvccCandidate previous()
public void previous(GridCacheMvccCandidate prev)
prev - Lock that comes before in the same thread.public GridCacheMvccCandidate next()
public void next(GridCacheMvccCandidate next)
next - Next candidate in this thread.public KeyCacheObject key()
public boolean matches(GridCacheVersion ver, UUID nodeId, long threadId)
nodeId - Node ID to check.ver - Version to check.threadId - Thread ID to check.True if matched.public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic int compareTo(GridCacheMvccCandidate o)
compareTo in interface Comparable<GridCacheMvccCandidate>
Follow @ApacheIgnite
Ignite Fabric : ver. 1.4.0 Release Date : September 24 2015