|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cassandra.db.marshal.AbstractType<T>
public abstract class AbstractType<T>
Specifies a Comparator for a specific type of ByteBuffer. Note that empty ByteBuffer are used to represent "start at the beginning" or "stop at the end" arguments to get_slice, so the Comparator should always handle those values even if they normally do not represent a valid ByteBuffer for the type being compared.
Field Summary | |
---|---|
java.util.Comparator<IColumn> |
columnComparator
|
java.util.Comparator<IColumn> |
columnReverseComparator
|
java.util.Comparator<IndexHelper.IndexInfo> |
indexComparator
|
java.util.Comparator<IndexHelper.IndexInfo> |
indexReverseComparator
|
java.util.Comparator<OnDiskAtom> |
onDiskAtomComparator
|
java.util.Comparator<java.nio.ByteBuffer> |
reverseComparator
|
Constructor Summary | |
---|---|
protected |
AbstractType()
|
Method Summary | |
---|---|
CQL3Type |
asCQL3Type()
|
int |
compareCollectionMembers(java.nio.ByteBuffer v1,
java.nio.ByteBuffer v2,
java.nio.ByteBuffer collectionName)
An alternative comparison function used by CollectionsType in conjunction with CompositeType. |
abstract T |
compose(java.nio.ByteBuffer bytes)
|
abstract java.nio.ByteBuffer |
decompose(T value)
|
abstract java.nio.ByteBuffer |
fromString(java.lang.String source)
get a byte representation of the given string. |
java.nio.ByteBuffer |
fromStringCQL2(java.lang.String source)
for compatibility with TimeUUID in CQL2. |
java.lang.String |
getColumnsString(java.util.Collection<IColumn> columns)
|
java.util.Comparator<java.nio.ByteBuffer> |
getReverseComparator()
Deprecated. use reverseComparator field instead |
abstract java.lang.String |
getString(java.nio.ByteBuffer bytes)
get a string representation of the bytes suitable for log messages |
java.lang.String |
getString(java.util.Collection<java.nio.ByteBuffer> names)
|
boolean |
isCollection()
|
boolean |
isCommutative()
|
boolean |
isCompatibleWith(AbstractType<?> previous)
Returns true if this comparator is compatible with the provided previous comparator, that is if previous can safely be replaced by this. |
static AbstractType<?> |
parseDefaultParameters(AbstractType<?> baseType,
TypeParser parser)
|
java.lang.String |
toString()
This must be overriden by subclasses if necessary so that for any AbstractType, this == TypeParser.parse(toString()). |
abstract void |
validate(java.nio.ByteBuffer bytes)
|
void |
validateCollectionMember(java.nio.ByteBuffer bytes,
java.nio.ByteBuffer collectionName)
An alternative validation function used by CollectionsType in conjunction with CompositeType. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
---|
compare, equals |
Field Detail |
---|
public final java.util.Comparator<IndexHelper.IndexInfo> indexComparator
public final java.util.Comparator<IndexHelper.IndexInfo> indexReverseComparator
public final java.util.Comparator<IColumn> columnComparator
public final java.util.Comparator<IColumn> columnReverseComparator
public final java.util.Comparator<OnDiskAtom> onDiskAtomComparator
public final java.util.Comparator<java.nio.ByteBuffer> reverseComparator
Constructor Detail |
---|
protected AbstractType()
Method Detail |
---|
public abstract T compose(java.nio.ByteBuffer bytes)
public abstract java.nio.ByteBuffer decompose(T value)
public abstract java.lang.String getString(java.nio.ByteBuffer bytes)
public abstract java.nio.ByteBuffer fromString(java.lang.String source) throws MarshalException
MarshalException
public java.nio.ByteBuffer fromStringCQL2(java.lang.String source) throws MarshalException
MarshalException
public abstract void validate(java.nio.ByteBuffer bytes) throws MarshalException
MarshalException
public CQL3Type asCQL3Type()
public java.util.Comparator<java.nio.ByteBuffer> getReverseComparator()
public java.lang.String getString(java.util.Collection<java.nio.ByteBuffer> names)
public java.lang.String getColumnsString(java.util.Collection<IColumn> columns)
public boolean isCommutative()
public static AbstractType<?> parseDefaultParameters(AbstractType<?> baseType, TypeParser parser) throws SyntaxException
SyntaxException
public boolean isCompatibleWith(AbstractType<?> previous)
public int compareCollectionMembers(java.nio.ByteBuffer v1, java.nio.ByteBuffer v2, java.nio.ByteBuffer collectionName)
public void validateCollectionMember(java.nio.ByteBuffer bytes, java.nio.ByteBuffer collectionName) throws MarshalException
MarshalException
public boolean isCollection()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |