public class CounterColumnType extends NumberType<java.lang.Long>
AbstractType.ComparisonType
AssignmentTestable.TestResult
Modifier and Type | Field and Description |
---|---|
static CounterColumnType |
instance |
comparatorSet, comparisonType, isByteOrderComparable, reverseComparator
Modifier and Type | Method and Description |
---|---|
java.nio.ByteBuffer |
add(NumberType<?> leftType,
java.nio.ByteBuffer left,
NumberType<?> rightType,
java.nio.ByteBuffer right)
Adds the left argument to the right one.
|
CQL3Type |
asCQL3Type() |
<V> java.lang.Long |
compose(V value,
ValueAccessor<V> accessor) |
java.nio.ByteBuffer |
decompose(java.lang.Long value) |
java.nio.ByteBuffer |
divide(NumberType<?> leftType,
java.nio.ByteBuffer left,
NumberType<?> rightType,
java.nio.ByteBuffer right)
Divides the left argument by the right one.
|
Term |
fromJSONObject(java.lang.Object parsed)
Given a parsed JSON string, return a byte representation of the object.
|
java.nio.ByteBuffer |
fromString(java.lang.String source)
get a byte representation of the given string.
|
TypeSerializer<java.lang.Long> |
getSerializer() |
<V> java.lang.String |
getString(V value,
ValueAccessor<V> accessor)
get a string representation of the bytes used for various identifier (NOT just for log messages)
|
boolean |
isCounter() |
boolean |
isEmptyValueMeaningless()
|
java.nio.ByteBuffer |
mod(NumberType<?> leftType,
java.nio.ByteBuffer left,
NumberType<?> rightType,
java.nio.ByteBuffer right)
Return the remainder.
|
java.nio.ByteBuffer |
multiply(NumberType<?> leftType,
java.nio.ByteBuffer left,
NumberType<?> rightType,
java.nio.ByteBuffer right)
Multiplies the left argument with the right one.
|
java.nio.ByteBuffer |
negate(java.nio.ByteBuffer input)
Negates the argument.
|
java.nio.ByteBuffer |
substract(NumberType<?> leftType,
java.nio.ByteBuffer left,
NumberType<?> rightType,
java.nio.ByteBuffer right)
Substracts the left argument from the right one.
|
java.lang.String |
toJSONString(java.nio.ByteBuffer buffer,
ProtocolVersion protocolVersion)
Converts the specified value into its JSON representation.
|
protected long |
toLong(java.nio.ByteBuffer value)
Converts the specified value into a
long if allowed. |
<V> void |
validateCellValue(V cellValue,
ValueAccessor<V> accessor)
Validate cell value.
|
isFloatingPoint, toBigDecimal, toBigInteger, toByte, toDouble, toFloat, toInt, toShort
asCQLTypeStringList, checkComparable, compare, compare, compareCollectionMembers, compareCustom, compareForCQL, compose, expandUserTypes, freeze, freezeNestedMulticellTypes, getComponents, getString, getString, isCollection, isCompatibleWith, isFreezable, isFrozenCollection, isMultiCell, isReversed, isTuple, isUDT, isValueCompatibleWith, isValueCompatibleWithInternal, parseDefaultParameters, read, readArray, readBuffer, readBuffer, referencesDuration, referencesUserType, referencesUserType, skipValue, subTypes, testAssignment, testAssignment, toJSONString, toString, toString, validate, validate, validateCollectionMember, valueLengthIfFixed, withUpdatedUserType, writeValue, writeValue, writtenLength, writtenLength
public static final CounterColumnType instance
public boolean isEmptyValueMeaningless()
AbstractType
isEmptyValueMeaningless
in class AbstractType<java.lang.Long>
public boolean isCounter()
isCounter
in class AbstractType<java.lang.Long>
public <V> java.lang.Long compose(V value, ValueAccessor<V> accessor)
compose
in class AbstractType<java.lang.Long>
public java.nio.ByteBuffer decompose(java.lang.Long value)
decompose
in class AbstractType<java.lang.Long>
public <V> void validateCellValue(V cellValue, ValueAccessor<V> accessor) throws MarshalException
AbstractType
validateCellValue
in class AbstractType<java.lang.Long>
cellValue
- ByteBuffer representing cell valueMarshalException
public <V> java.lang.String getString(V value, ValueAccessor<V> accessor)
AbstractType
getString
in class AbstractType<java.lang.Long>
public java.nio.ByteBuffer fromString(java.lang.String source)
AbstractType
fromString
in class AbstractType<java.lang.Long>
public Term fromJSONObject(java.lang.Object parsed)
AbstractType
fromJSONObject
in class AbstractType<java.lang.Long>
parsed
- the result of parsing a json stringpublic java.lang.String toJSONString(java.nio.ByteBuffer buffer, ProtocolVersion protocolVersion)
AbstractType
The buffer position will stay the same.
toJSONString
in class AbstractType<java.lang.Long>
buffer
- the value to convertprotocolVersion
- the protocol version to use for the conversionpublic CQL3Type asCQL3Type()
asCQL3Type
in class AbstractType<java.lang.Long>
public TypeSerializer<java.lang.Long> getSerializer()
getSerializer
in class AbstractType<java.lang.Long>
protected long toLong(java.nio.ByteBuffer value)
NumberType
long
if allowed.toLong
in class NumberType<java.lang.Long>
value
- the value to convertpublic java.nio.ByteBuffer add(NumberType<?> leftType, java.nio.ByteBuffer left, NumberType<?> rightType, java.nio.ByteBuffer right)
NumberType
add
in class NumberType<java.lang.Long>
leftType
- the type associated to the left argumentleft
- the left argumentrightType
- the type associated to the right argumentright
- the right argumentpublic java.nio.ByteBuffer substract(NumberType<?> leftType, java.nio.ByteBuffer left, NumberType<?> rightType, java.nio.ByteBuffer right)
NumberType
substract
in class NumberType<java.lang.Long>
leftType
- the type associated to the left argumentleft
- the left argumentrightType
- the type associated to the right argumentright
- the right argumentpublic java.nio.ByteBuffer multiply(NumberType<?> leftType, java.nio.ByteBuffer left, NumberType<?> rightType, java.nio.ByteBuffer right)
NumberType
multiply
in class NumberType<java.lang.Long>
leftType
- the type associated to the left argumentleft
- the left argumentrightType
- the type associated to the right argumentright
- the right argumentpublic java.nio.ByteBuffer divide(NumberType<?> leftType, java.nio.ByteBuffer left, NumberType<?> rightType, java.nio.ByteBuffer right)
NumberType
divide
in class NumberType<java.lang.Long>
leftType
- the type associated to the left argumentleft
- the left argumentrightType
- the type associated to the right argumentright
- the right argumentpublic java.nio.ByteBuffer mod(NumberType<?> leftType, java.nio.ByteBuffer left, NumberType<?> rightType, java.nio.ByteBuffer right)
NumberType
mod
in class NumberType<java.lang.Long>
leftType
- the type associated to the left argumentleft
- the left argumentrightType
- the type associated to the right argumentright
- the right argumentpublic java.nio.ByteBuffer negate(java.nio.ByteBuffer input)
NumberType
negate
in class NumberType<java.lang.Long>
input
- the argument to negateCopyright © 2009-2022 The Apache Software Foundation