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) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(GridCacheMvccCandidate o) |
boolean |
dhtLocal() |
boolean |
equals(Object o) |
short |
flags() |
int |
hashCode() |
boolean |
hasReentry() |
KeyCacheObject |
key() |
boolean |
local() |
boolean |
matches(GridCacheVersion ver,
UUID nodeId,
long threadId)
Checks if this candidate matches version or thread-nodeId combination.
|
boolean |
nearLocal() |
GridCacheMvccCandidate |
next() |
void |
next(GridCacheMvccCandidate next) |
UUID |
nodeId() |
UUID |
otherNodeId() |
void |
otherNodeId(UUID otherNodeId) |
GridCacheVersion |
otherVersion() |
boolean |
otherVersion(GridCacheVersion otherVer)
Sets mapped version for candidate.
|
boolean |
owner() |
GridCacheVersion |
ownerVersion() |
boolean |
ownerVersion(GridCacheVersion ownerVer)
Sets owned version for proper lock ordering when remote candidate is added.
|
<V> GridCacheEntryEx |
parent() |
void |
parent(GridCacheEntryEx parent) |
GridCacheMvccCandidate |
previous() |
void |
previous(GridCacheMvccCandidate prev) |
void |
readExternal(ObjectInput in) |
boolean |
ready() |
GridCacheMvccCandidate |
reenter() |
boolean |
reentry() |
boolean |
removed() |
void |
setOwner()
Sets owner flag.
|
void |
setReady()
Sets ready flag.
|
void |
setReentry()
Sets reentry flag.
|
void |
setRemoved()
Sets removed flag.
|
void |
setUsed()
Sets used flag.
|
boolean |
singleImplicit() |
long |
threadId() |
long |
timeout() |
long |
timestamp() |
long |
topologyVersion() |
void |
topologyVersion(long topVer) |
String |
toString() |
boolean |
tx() |
GridCacheMvccCandidate |
unenter() |
boolean |
used() |
GridCacheVersion |
version() |
void |
writeExternal(ObjectOutput out) |
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 long topologyVersion()
public void topologyVersion(long topVer)
topVer - Topology version.public GridCacheMvccCandidate reenter()
public boolean hasReentry()
True if has reentry.@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 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()
public GridCacheMvccCandidate previous()
public void previous(GridCacheMvccCandidate prev)
prev - Lock that comes before in the same thread, possibly null.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.0.0-RC3 Release Date : March 24 2015