public class GridCacheVersion extends Object implements Message, Externalizable, CacheEntryVersion
DIRECT_TYPE_SIZE| Constructor and Description |
|---|
GridCacheVersion()
Empty constructor required by
Externalizable. |
GridCacheVersion(int topVer,
int nodeOrderDrId,
long order) |
GridCacheVersion(int topVer,
long order,
int nodeOrder,
int dataCenterId) |
| Modifier and Type | Method and Description |
|---|---|
IgniteUuid |
asIgniteUuid() |
byte |
clusterId()
Cluster id is a value to distinguish updates in case user wants to aggregate and sort updates from several
Ignite clusters.
|
int |
compareTo(CacheEntryVersion other) |
GridCacheVersion |
conflictVersion() |
byte |
dataCenterId() |
short |
directType()
Gets message type.
|
boolean |
equals(Object o) |
byte |
fieldsCount()
Gets fields count.
|
int |
hashCode() |
boolean |
isGreater(GridCacheVersion ver) |
boolean |
isGreaterEqual(GridCacheVersion ver) |
boolean |
isLess(GridCacheVersion ver) |
boolean |
isLessEqual(GridCacheVersion ver) |
int |
nodeOrder() |
int |
nodeOrderAndDrIdRaw()
Gets combined node order and DR ID.
|
void |
onAckReceived()
Method called when ack message received.
|
long |
order()
Order of the update.
|
CacheEntryVersion |
otherClusterVersion()
If source of the update is "local" cluster then
null will be returned. |
void |
readExternal(ObjectInput in) |
boolean |
readFrom(ByteBuffer buf,
MessageReader reader)
Reads this message from provided byte buffer.
|
int |
topologyVersion() |
String |
toString() |
void |
writeExternal(ObjectOutput out) |
boolean |
writeTo(ByteBuffer buf,
MessageWriter writer)
Writes this message to provided byte buffer.
|
public GridCacheVersion()
Externalizable.public GridCacheVersion(int topVer,
long order,
int nodeOrder,
int dataCenterId)
topVer - Topology version plus number of seconds from the start time of the first grid node.order - Version order.nodeOrder - Node order.dataCenterId - Replication data center ID.public GridCacheVersion(int topVer,
int nodeOrderDrId,
long order)
topVer - Topology version plus number of seconds from the start time of the first grid node.nodeOrderDrId - Node order and DR ID.order - Version order.public int topologyVersion()
topologyVersion in interface CacheEntryVersionpublic int nodeOrderAndDrIdRaw()
public long order()
CacheEntryVersionorder in interface CacheEntryVersionpublic CacheEntryVersion otherClusterVersion()
null will be returned.
If updated comes from the other cluster using IgniteInternalCache.putAllConflict(Map)
then entry version for other cluster.otherClusterVersion in interface CacheEntryVersionIgniteInternalCache.putAllConflict(Map),
IgniteInternalCache.removeAllConflict(Map)public int nodeOrder()
nodeOrder in interface CacheEntryVersionpublic byte clusterId()
clusterId id can be set for the node using
GridCacheVersionManager.dataCenterId(byte).clusterId in interface CacheEntryVersionpublic byte dataCenterId()
public GridCacheVersion conflictVersion()
public boolean isGreater(GridCacheVersion ver)
ver - Version.True if this version is greater.public boolean isGreaterEqual(GridCacheVersion ver)
ver - Version.True if this version is greater or equal.public boolean isLess(GridCacheVersion ver)
ver - Version.True if this version is less.public boolean isLessEqual(GridCacheVersion ver)
ver - Version.True if this version is less or equal.public IgniteUuid asIgniteUuid()
IgniteUuidpublic void onAckReceived()
onAckReceived in interface Messagepublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException
readExternal in interface ExternalizableIOExceptionpublic int compareTo(CacheEntryVersion other)
compareTo in interface Comparable<CacheEntryVersion>public boolean writeTo(ByteBuffer buf, MessageWriter writer)
public boolean readFrom(ByteBuffer buf, MessageReader reader)
public short directType()
directType in interface Messagepublic byte fieldsCount()
fieldsCount in interface Message
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.15.0 Release Date : April 25 2023