Class GroupingState
- java.lang.Object
-
- org.apache.cassandra.db.aggregation.GroupingState
-
public final class GroupingState extends java.lang.ObjectGroupMakerstate.The state contains the primary key of the last row that has been processed by the previous
GroupMakerused. It can be passed to aGroupMakerto allow to resuming the grouping.GroupingStateis only used for internal paging. When a new page is requested by a client the initial state will always be empty.If the state has a partition key but no clustering, it means that the previous group ended at the end of the previous partition. If the clustering is not null it means that we are in the middle of a group.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGroupingState.Serializer
-
Field Summary
Fields Modifier and Type Field Description static GroupingStateEMPTY_STATEstatic GroupingState.Serializerserializer
-
Constructor Summary
Constructors Constructor Description GroupingState(java.nio.ByteBuffer partitionKey, Clustering<?> clustering)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Clustering<?>clustering()Returns the last row clustering ornullif either no rows has been processed yet or the last row was a static row.booleanhasClustering()Checks if the state contains a Clustering for the last row that has been processed.java.nio.ByteBufferpartitionKey()Returns the last row partition key ornullif no rows has been processed yet.
-
-
-
Field Detail
-
serializer
public static final GroupingState.Serializer serializer
-
EMPTY_STATE
public static final GroupingState EMPTY_STATE
-
-
Constructor Detail
-
GroupingState
public GroupingState(java.nio.ByteBuffer partitionKey, Clustering<?> clustering)
-
-
Method Detail
-
partitionKey
public java.nio.ByteBuffer partitionKey()
Returns the last row partition key ornullif no rows has been processed yet.- Returns:
- the last row partition key or
nullif no rows has been processed yet
-
clustering
public Clustering<?> clustering()
Returns the last row clustering ornullif either no rows has been processed yet or the last row was a static row.- Returns:
- he last row clustering or
nullif either no rows has been processed yet or the last row was a static row
-
hasClustering
public boolean hasClustering()
Checks if the state contains a Clustering for the last row that has been processed.- Returns:
trueif the state contains a Clustering for the last row that has been processed,falseotherwise.
-
-