Class PagingState


  • public class PagingState
    extends java.lang.Object
    • Field Detail

      • partitionKey

        public final java.nio.ByteBuffer partitionKey
      • remaining

        public final int remaining
      • remainingInPartition

        public final int remainingInPartition
    • Constructor Detail

      • PagingState

        public PagingState​(java.nio.ByteBuffer partitionKey,
                           PagingState.RowMark rowMark,
                           int remaining,
                           int remainingInPartition)
    • Method Detail

      • serialize

        public java.nio.ByteBuffer serialize​(ProtocolVersion protocolVersion)
      • serializedSize

        public int serializedSize​(ProtocolVersion protocolVersion)
      • deserialize

        public static PagingState deserialize​(java.nio.ByteBuffer bytes,
                                              ProtocolVersion protocolVersion)
        It's possible to receive a V3 paging state on a V4 client session, and vice versa - so we cannot blindly rely on the protocol version provided. We must verify first that the buffer indeed contains a paging state that adheres to the protocol version provided, or, if not - see if it is in a different version, in which case we try the other format.
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public final boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object