public abstract class AbstractType<T>
extends java.lang.Object
implements java.util.Comparator<java.nio.ByteBuffer>
Modifier and Type | Field and Description |
---|---|
java.util.Comparator<Column> |
columnComparator |
java.util.Comparator<Column> |
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 |
Modifier | Constructor and Description |
---|---|
protected |
AbstractType() |
Modifier and Type | Method and Description |
---|---|
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.
|
int |
componentsCount()
The number of subcomponents this type has.
|
T |
compose(java.nio.ByteBuffer bytes) |
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.lang.Iterable<Column> columns) |
java.util.List<AbstractType<?>> |
getComponents()
Return a list of the "subcomponents" this type has.
|
java.util.Comparator<java.nio.ByteBuffer> |
getReverseComparator()
Deprecated.
use reverseComparator field instead
|
abstract TypeSerializer<T> |
getSerializer() |
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) |
protected boolean |
intersects(java.nio.ByteBuffer minColName,
java.nio.ByteBuffer maxColName,
java.nio.ByteBuffer sliceStart,
java.nio.ByteBuffer sliceEnd) |
boolean |
intersects(java.util.List<java.nio.ByteBuffer> minColumnNames,
java.util.List<java.nio.ByteBuffer> maxColumnNames,
SliceQueryFilter filter) |
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.
|
boolean |
isValueCompatibleWith(AbstractType<?> previous)
Returns true if values of the previous AbstracType can be read by the this
AbsractType.
|
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()).
|
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.
|
public final java.util.Comparator<IndexHelper.IndexInfo> indexComparator
public final java.util.Comparator<IndexHelper.IndexInfo> indexReverseComparator
public final java.util.Comparator<Column> columnComparator
public final java.util.Comparator<Column> columnReverseComparator
public final java.util.Comparator<OnDiskAtom> onDiskAtomComparator
public final java.util.Comparator<java.nio.ByteBuffer> reverseComparator
public T compose(java.nio.ByteBuffer bytes)
public java.nio.ByteBuffer decompose(T value)
public 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 void validate(java.nio.ByteBuffer bytes) throws MarshalException
MarshalException
public CQL3Type asCQL3Type()
public abstract TypeSerializer<T> getSerializer()
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.lang.Iterable<Column> columns)
public boolean isCommutative()
public static AbstractType<?> parseDefaultParameters(AbstractType<?> baseType, TypeParser parser) throws SyntaxException
SyntaxException
public boolean isCompatibleWith(AbstractType<?> previous)
public boolean isValueCompatibleWith(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 int componentsCount()
public java.util.List<AbstractType<?>> getComponents()
public java.lang.String toString()
toString
in class java.lang.Object
protected boolean intersects(java.nio.ByteBuffer minColName, java.nio.ByteBuffer maxColName, java.nio.ByteBuffer sliceStart, java.nio.ByteBuffer sliceEnd)
public boolean intersects(java.util.List<java.nio.ByteBuffer> minColumnNames, java.util.List<java.nio.ByteBuffer> maxColumnNames, SliceQueryFilter filter)
Copyright © 2014 The Apache Software Foundation