org.apache.cassandra.db.marshal
Class LocalByPartionerType<T extends Token>
java.lang.Object
org.apache.cassandra.db.marshal.AbstractType<java.nio.ByteBuffer>
org.apache.cassandra.db.marshal.LocalByPartionerType<T>
- All Implemented Interfaces:
- java.util.Comparator<java.nio.ByteBuffer>
public class LocalByPartionerType<T extends Token>
- extends AbstractType<java.nio.ByteBuffer>
for sorting columns representing row keys in the row ordering as determined by a partitioner.
Not intended for user-defined CFs, and will in fact error out if used with such.
Method Summary |
int |
compare(java.nio.ByteBuffer o1,
java.nio.ByteBuffer o2)
|
java.nio.ByteBuffer |
compose(java.nio.ByteBuffer bytes)
|
java.nio.ByteBuffer |
decompose(java.nio.ByteBuffer bytes)
|
java.nio.ByteBuffer |
fromString(java.lang.String source)
get a byte representation of the given string. |
java.lang.String |
getString(java.nio.ByteBuffer bytes)
get a string representation of the bytes suitable for log messages |
void |
validate(java.nio.ByteBuffer bytes)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
equals |
LocalByPartionerType
public LocalByPartionerType(IPartitioner<T> partitioner)
compose
public java.nio.ByteBuffer compose(java.nio.ByteBuffer bytes)
- Specified by:
compose
in class AbstractType<java.nio.ByteBuffer>
decompose
public java.nio.ByteBuffer decompose(java.nio.ByteBuffer bytes)
- Specified by:
decompose
in class AbstractType<java.nio.ByteBuffer>
getString
public java.lang.String getString(java.nio.ByteBuffer bytes)
- Description copied from class:
AbstractType
- get a string representation of the bytes suitable for log messages
- Specified by:
getString
in class AbstractType<java.nio.ByteBuffer>
fromString
public java.nio.ByteBuffer fromString(java.lang.String source)
- Description copied from class:
AbstractType
- get a byte representation of the given string.
defaults to unsupportedoperation so people deploying custom Types can update at their leisure.
- Overrides:
fromString
in class AbstractType<java.nio.ByteBuffer>
compare
public int compare(java.nio.ByteBuffer o1,
java.nio.ByteBuffer o2)
validate
public void validate(java.nio.ByteBuffer bytes)
throws MarshalException
- Specified by:
validate
in class AbstractType<java.nio.ByteBuffer>
- Throws:
MarshalException
Copyright © 2012 The Apache Software Foundation