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 voidaddFunctionsTo(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.PartitionKeyRestrictionsdoMergeWith(TokenRestriction otherRestriction)Merges this restriction with the specifiedTokenRestriction.booleanhasBound(Bound b)booleanhasContains()Checks if any of the underlying restrictions is a CONTAINS / CONTAINS KEY restriction.booleanhasSlice()Checks if any of the underlying restrictions is a slice.booleanisInclusive(Bound b)java.lang.StringtoString()java.util.List<java.nio.ByteBuffer>values(QueryOptions options, ClientState state)-
Methods inherited from class org.apache.cassandra.cql3.restrictions.TokenRestriction
addRowFilterTo, getColumnDefs, getColumnNamesAsString, getFirstColumn, getLastColumn, getRestrictions, hasIN, hasOnlyEqualityRestrictions, hasSupportingIndex, hasUnrestrictedPartitionKeyComponents, isEmpty, isOnToken, mergeWith, needFiltering, size
-
-
-
-
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:RestrictionsChecks if any of the underlying restrictions is a CONTAINS / CONTAINS KEY restriction.- Returns:
trueif any of the underlying restrictions is CONTAINS,falseotherwise
-
hasSlice
public boolean hasSlice()
Description copied from interface:RestrictionsChecks if any of the underlying restrictions is a slice.- Specified by:
hasSlicein interfaceRestrictions- Overrides:
hasSlicein classTokenRestriction- Returns:
trueif any of the underlying restrictions is a slice,falseotherwise
-
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:RestrictionAdds 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:TokenRestrictionMerges this restriction with the specifiedTokenRestriction.- Specified by:
doMergeWithin classTokenRestriction- Parameters:
otherRestriction- theTokenRestrictionto merge with.- Throws:
InvalidRequestException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-