Package org.gridgain.internal.dr.common
Class GridCacheVersion
java.lang.Object
org.gridgain.internal.dr.common.GridCacheVersion
- All Implemented Interfaces:
Externalizable,Serializable,Comparable<GridCacheVersion>
public class GridCacheVersion
extends Object
implements Externalizable, Comparable<GridCacheVersion>
Entry version.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor required byExternalizable.GridCacheVersion(int topVer, long order, int nodeOrder, int dataCenterId) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(GridCacheVersion other) byteReturns datacenter id.booleaninthashCode()intReturns node order.longorder()Returns version order.voidprotected voidProtocol version 1.protected voidProtocol version 2.intReturns topology version.toString()longReturns Update counter.voidprotected voidProtocol version 1.protected voidProtocol version 2.
-
Field Details
-
order
protected long orderOrder.
-
-
Constructor Details
-
GridCacheVersion
public GridCacheVersion()Empty constructor required byExternalizable. -
GridCacheVersion
public GridCacheVersion(int topVer, long order, int nodeOrder, int dataCenterId) Constructor.- Parameters:
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.
-
-
Method Details
-
topologyVersion
public int topologyVersion()Returns topology version. -
order
public long order()Returns version order. -
nodeOrder
public int nodeOrder()Returns node order. -
dataCenterId
public byte dataCenterId()Returns datacenter id. -
updateCounter
public long updateCounter()Returns Update counter. -
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOException
-
writeExternalV1
Protocol version 1.- Parameters:
out- the stream to write the object to- Throws:
IOException- Includes any I/O exceptions that may occur
-
readExternalV1
Protocol version 1.- Parameters:
in- the stream to read data from in order to restore the object- Throws:
IOException- if I/O errors occur
-
writeExternalV2
Protocol version 2.- Parameters:
out- the stream to write the object to- Throws:
IOException- Includes any I/O exceptions that may occur
-
readExternalV2
Protocol version 2.- Parameters:
in- the stream to read data from in order to restore the object- Throws:
IOException- if I/O errors occur
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareToin interfaceComparable<GridCacheVersion>
-
toString
-