Class TokenRestriction.SliceRestriction
- java.lang.Object
-
- org.apache.cassandra.cql3.restrictions.TokenRestriction
-
- org.apache.cassandra.cql3.restrictions.TokenRestriction.SliceRestriction
-
- All Implemented Interfaces:
Restriction
,Restrictions
- Enclosing class:
- TokenRestriction
public static class TokenRestriction.SliceRestriction extends TokenRestriction
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.cassandra.cql3.restrictions.TokenRestriction
TokenRestriction.EQRestriction, TokenRestriction.SliceRestriction
-
-
Field Summary
-
Fields inherited from class org.apache.cassandra.cql3.restrictions.TokenRestriction
columnDefs, metadata
-
-
Constructor Summary
Constructors Constructor Description SliceRestriction(TableMetadata table, java.util.List<ColumnMetadata> columnDefs, Bound bound, boolean inclusive, Term term)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFunctionsTo(java.util.List<Function> functions)
Adds all functions (native and user-defined) used by any component of the restriction to the specified list.java.util.List<java.nio.ByteBuffer>
bounds(Bound b, QueryOptions options)
protected org.apache.cassandra.cql3.restrictions.PartitionKeyRestrictions
doMergeWith(TokenRestriction otherRestriction)
Merges this restriction with the specifiedTokenRestriction
.boolean
hasBound(Bound b)
boolean
hasContains()
Checks if any of the underlying restrictions is a CONTAINS / CONTAINS KEY restriction.boolean
hasSlice()
Checks if any of the underlying restrictions is a slice.boolean
isInclusive(Bound b)
java.lang.String
toString()
java.util.List<java.nio.ByteBuffer>
values(QueryOptions options, ClientState state)
-
Methods inherited from class org.apache.cassandra.cql3.restrictions.TokenRestriction
addToRowFilter, getColumnDefs, getColumnNamesAsString, getFirstColumn, getLastColumn, getRestrictions, hasIN, hasOnlyEqualityRestrictions, hasSupportingIndex, hasUnrestrictedPartitionKeyComponents, isEmpty, isOnToken, mergeWith, needFiltering, needsFiltering, size
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.cql3.restrictions.Restrictions
getColumnDefinitions
-
-
-
-
Constructor Detail
-
SliceRestriction
public SliceRestriction(TableMetadata table, java.util.List<ColumnMetadata> columnDefs, Bound bound, boolean inclusive, Term term)
-
-
Method Detail
-
hasContains
public boolean hasContains()
Description copied from interface:Restrictions
Checks if any of the underlying restrictions is a CONTAINS / CONTAINS KEY restriction.- Returns:
true
if any of the underlying restrictions is CONTAINS,false
otherwise
-
hasSlice
public boolean hasSlice()
Description copied from interface:Restrictions
Checks if any of the underlying restrictions is a slice.- Specified by:
hasSlice
in interfaceRestrictions
- Overrides:
hasSlice
in classTokenRestriction
- Returns:
true
if any of the underlying restrictions is a slice,false
otherwise
-
values
public java.util.List<java.nio.ByteBuffer> values(QueryOptions options, ClientState state) throws InvalidRequestException
- Throws:
InvalidRequestException
-
hasBound
public boolean hasBound(Bound b)
-
bounds
public java.util.List<java.nio.ByteBuffer> bounds(Bound b, QueryOptions options) throws InvalidRequestException
- Throws:
InvalidRequestException
-
addFunctionsTo
public void addFunctionsTo(java.util.List<Function> functions)
Description copied from interface:Restriction
Adds all functions (native and user-defined) used by any component of the restriction to the specified list.- Parameters:
functions
- the list to add to
-
isInclusive
public boolean isInclusive(Bound b)
-
doMergeWith
protected org.apache.cassandra.cql3.restrictions.PartitionKeyRestrictions doMergeWith(TokenRestriction otherRestriction) throws InvalidRequestException
Description copied from class:TokenRestriction
Merges this restriction with the specifiedTokenRestriction
.- Specified by:
doMergeWith
in classTokenRestriction
- Parameters:
otherRestriction
- theTokenRestriction
to merge with.- Throws:
InvalidRequestException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-