Class PrimaryKey.Factory
- java.lang.Object
-
- org.apache.cassandra.index.sai.utils.PrimaryKey.Factory
-
- Enclosing interface:
- PrimaryKey
public static class PrimaryKey.Factory extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Factory(IPartitioner partitioner, ClusteringComparator clusteringComparator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Clustering<?>
clusteringFromByteComparable(ByteSource byteSource)
Create aClustering
from aByteSource
.PrimaryKey
create(DecoratedKey partitionKey)
Create aPrimaryKey
for tables without clustering columnsPrimaryKey
create(DecoratedKey partitionKey, Clustering<?> clustering)
Creates aPrimaryKey
that is fully represented by partition key and clustering.PrimaryKey
create(Token token)
Creates aPrimaryKey
that is represented by aToken
.PrimaryKey
fromComparableBytes(ByteSource byteSource)
Create aPrimaryKey
from aByteSource
.DecoratedKey
partitionKeyFromComparableBytes(ByteSource byteSource)
Create aDecoratedKey
from aByteSource
.
-
-
-
Constructor Detail
-
Factory
public Factory(IPartitioner partitioner, ClusteringComparator clusteringComparator)
-
-
Method Detail
-
create
public PrimaryKey create(Token token)
Creates aPrimaryKey
that is represented by aToken
.Token
only primary keys are used for defining the partition range of a query.
-
create
public PrimaryKey create(DecoratedKey partitionKey)
Create aPrimaryKey
for tables without clustering columns
-
create
public PrimaryKey create(DecoratedKey partitionKey, Clustering<?> clustering)
Creates aPrimaryKey
that is fully represented by partition key and clustering.
-
fromComparableBytes
public PrimaryKey fromComparableBytes(ByteSource byteSource)
Create aPrimaryKey
from aByteSource
. This should only be used withByteSource
instances created by calls toPrimaryKey.asComparableBytes(Version)
.
-
partitionKeyFromComparableBytes
public DecoratedKey partitionKeyFromComparableBytes(ByteSource byteSource)
Create aDecoratedKey
from aByteSource
. This is a separate method because of it's use by thePrimaryKeyMap
implementations to create partition keys.
-
clusteringFromByteComparable
public Clustering<?> clusteringFromByteComparable(ByteSource byteSource)
Create aClustering
from aByteSource
. This is a separate method because of its use by theWidePrimaryKeyMap
to create its clustering keys.
-
-