public class ColumnIdentifier extends java.lang.Object implements IMeasurableMemory, java.lang.Comparable<ColumnIdentifier>
Modifier and Type | Field and Description |
---|---|
java.nio.ByteBuffer |
bytes |
long |
prefixComparison
since these objects are compared frequently, we stash an efficiently compared prefix of the bytes, in the expectation
that the majority of comparisons can be answered by this value only
|
Constructor and Description |
---|
ColumnIdentifier(java.nio.ByteBuffer bytes,
AbstractType<?> type) |
ColumnIdentifier(java.nio.ByteBuffer bytes,
java.lang.String text) |
ColumnIdentifier(java.lang.String rawText,
boolean keepCase) |
Modifier and Type | Method and Description |
---|---|
ColumnIdentifier |
clone(ByteBufferCloner cloner) |
int |
compareTo(ColumnIdentifier that) |
boolean |
equals(java.lang.Object o) |
static ColumnIdentifier |
getInterned(AbstractType<?> type,
java.nio.ByteBuffer bytes,
java.lang.String text) |
static ColumnIdentifier |
getInterned(java.nio.ByteBuffer bytes,
AbstractType<?> type) |
static ColumnIdentifier |
getInterned(java.lang.String rawText,
boolean keepCase) |
int |
hashCode() |
boolean |
isInterned() |
static java.lang.String |
maybeQuote(java.lang.String text) |
java.lang.String |
toCQLString()
Returns a string representation of the identifier that is safe to use directly in CQL queries.
|
java.lang.String |
toString() |
long |
unsharedHeapSize() |
long |
unsharedHeapSizeExcludingData() |
public final java.nio.ByteBuffer bytes
public final long prefixComparison
public ColumnIdentifier(java.lang.String rawText, boolean keepCase)
public ColumnIdentifier(java.nio.ByteBuffer bytes, AbstractType<?> type)
public ColumnIdentifier(java.nio.ByteBuffer bytes, java.lang.String text)
public static ColumnIdentifier getInterned(java.nio.ByteBuffer bytes, AbstractType<?> type)
public static ColumnIdentifier getInterned(java.lang.String rawText, boolean keepCase)
public static ColumnIdentifier getInterned(AbstractType<?> type, java.nio.ByteBuffer bytes, java.lang.String text)
public boolean isInterned()
public final int hashCode()
hashCode
in class java.lang.Object
public final boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toCQLString()
public long unsharedHeapSize()
unsharedHeapSize
in interface IMeasurableMemory
public long unsharedHeapSizeExcludingData()
public ColumnIdentifier clone(ByteBufferCloner cloner)
public int compareTo(ColumnIdentifier that)
compareTo
in interface java.lang.Comparable<ColumnIdentifier>
public static java.lang.String maybeQuote(java.lang.String text)
Copyright © 2009- The Apache Software Foundation