Class CassandraScrollPosition
java.lang.Object
org.springframework.data.cassandra.core.query.CassandraScrollPosition
- All Implemented Interfaces:
ScrollPosition
Cassandra-specific implementation of
ScrollPosition
using
PagingState
.- Since:
- 4.2
- Author:
- Mark Paluch
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.data.domain.ScrollPosition
ScrollPosition.Direction
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract ByteBuffer
Returns the underlying binary representation of the paging state as read-only buffer if the scroll position is notinitial()
.static CassandraScrollPosition
initial()
Returns an initialCassandraScrollPosition
.static CassandraScrollPosition
of
(ByteBuffer pagingState) Creates a continuationCassandraScrollPosition
givenpagingState
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.data.domain.ScrollPosition
isInitial
-
Constructor Details
-
CassandraScrollPosition
public CassandraScrollPosition()
-
-
Method Details
-
initial
Returns an initialCassandraScrollPosition
.- Returns:
- an initial
CassandraScrollPosition
.
-
of
Creates a continuationCassandraScrollPosition
givenpagingState
.- Returns:
- a continuation
CassandraScrollPosition
givenpagingState
.
-
getPagingState
Returns the underlying binary representation of the paging state as read-only buffer if the scroll position is notinitial()
.- Returns:
- the underlying binary representation of the paging state.
- Throws:
IllegalStateException
- if the scroll positioninitial()
(i.e. the scroll position isn't associated with a continuation).
-