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 Details

    • order

      protected long order
      Order.
  • Constructor Details

    • GridCacheVersion

      public GridCacheVersion()
      Empty constructor required by Externalizable.
    • 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

      public void writeExternal(ObjectOutput out) throws IOException
      Specified by:
      writeExternal in interface Externalizable
      Throws:
      IOException
    • readExternal

      public void readExternal(ObjectInput in) throws IOException
      Specified by:
      readExternal in interface Externalizable
      Throws:
      IOException
    • writeExternalV1

      protected void writeExternalV1(ObjectOutput out) throws IOException
      Protocol version 1.
      Parameters:
      out - the stream to write the object to
      Throws:
      IOException - Includes any I/O exceptions that may occur
    • readExternalV1

      protected void readExternalV1(ObjectInput in) throws IOException
      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

      protected void writeExternalV2(ObjectOutput out) throws IOException
      Protocol version 2.
      Parameters:
      out - the stream to write the object to
      Throws:
      IOException - Includes any I/O exceptions that may occur
    • readExternalV2

      protected void readExternalV2(ObjectInput in) throws IOException
      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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • compareTo

      public int compareTo(GridCacheVersion other)
      Specified by:
      compareTo in interface Comparable<GridCacheVersion>
    • toString

      public String toString()
      Overrides:
      toString in class Object