public abstract class Value extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Value.BlobValue
Blob value.
|
static class |
Value.BooleanValue
Boolean value.
|
static class |
Value.BoolIntValue
Boolean value that converts to integer when sending a bin to the server.
|
static class |
Value.ByteSegmentValue
Byte segment value.
|
static class |
Value.BytesValue
Byte array value.
|
static class |
Value.ByteValue
Byte value.
|
static class |
Value.DoubleValue
Double value.
|
static class |
Value.FloatValue
Float value.
|
static class |
Value.GeoJSONValue
GeoJSON value.
|
static class |
Value.HLLValue
HyperLogLog value.
|
static class |
Value.InfinityValue
Infinity value.
|
static class |
Value.IntegerValue
Integer value.
|
static class |
Value.ListValue
List value.
|
static class |
Value.LongValue
Long value.
|
static class |
Value.MapValue
Map value.
|
static class |
Value.NullValue
Empty value.
|
static class |
Value.SortedMapValue
Sorted map value.
|
static class |
Value.StringValue
String value.
|
static class |
Value.ValueArray
Value array.
|
static class |
Value.WildcardValue
Wildcard value.
|
Modifier and Type | Field and Description |
---|---|
static boolean |
DisableSerializer
Should default object serializer be disabled.
|
static Value |
INFINITY
Infinity value to be used in CDT range comparisons only.
|
static Value |
NULL
Null value.
|
static boolean |
UseBoolBin
Should client send boolean particle type for a boolean bin.
|
static Value |
WILDCARD
Wildcard value to be used in CDT range comparisons only.
|
Constructor and Description |
---|
Value() |
Modifier and Type | Method and Description |
---|---|
abstract int |
estimateSize()
Calculate number of bytes necessary to serialize the value in the wire protocol.
|
static Value |
get(boolean value)
Get boolean value instance.
|
static Value |
get(byte value)
Get byte value instance.
|
static Value |
get(byte[] value)
Get byte array or null value instance.
|
static Value |
get(byte[] value,
int type)
Get byte array with type or null value instance.
|
static Value |
get(byte[] value,
int offset,
int length)
Get byte segment or null value instance.
|
static Value |
get(ByteBuffer bb)
Get byte segment or null value instance.
|
static Value |
get(double value)
Get double value instance.
|
static Value |
get(Enum<?> value)
Get enum value string instance.
|
static Value |
get(float value)
Get float value instance.
|
static Value |
get(int value)
Get integer value instance.
|
static Value |
get(List<?> value)
Get list or null value instance.
|
static Value |
get(List<? extends Map.Entry<?,?>> value,
MapOrder mapOrder)
Get sorted map or null value instance.
|
static Value |
get(long value)
Get long value instance.
|
static Value |
get(Map<?,?> value)
Get map or null value instance.
|
static Value |
get(Map<?,?> value,
MapOrder order)
Get map or null value instance.
|
static Value |
get(Object value)
Determine value given generic object.
|
static Value |
get(String value)
Get string or null value instance.
|
static Value |
get(UUID value)
Get UUID value string instance.
|
static Value |
get(Value[] value)
Get value array instance.
|
static Value |
getAsBlob(Object value)
Get blob or null value instance.
|
static Value |
getAsGeoJSON(String value)
Get GeoJSON or null value instance.
|
static Value |
getAsHLL(byte[] value)
Get HyperLogLog or null value instance.
|
static Value |
getAsNull()
Get null value instance.
|
static Value |
getFromRecordObject(Object value)
Deprecated.
Use |
abstract org.luaj.vm2.LuaValue |
getLuaValue(com.aerospike.client.lua.LuaInstance instance)
Return value as an Object.
|
abstract Object |
getObject()
Return original value as an Object.
|
abstract int |
getType()
Get wire protocol value type.
|
abstract void |
pack(com.aerospike.client.util.Packer packer)
Serialize the value using MessagePack.
|
int |
toInteger()
Return value as an integer.
|
long |
toLong()
Return value as a long.
|
void |
validateKeyType()
Validate if value type can be used as a key.
|
abstract int |
write(byte[] buffer,
int offset)
Serialize the value in the wire protocol.
|
public static boolean UseBoolBin
public static boolean DisableSerializer
Bin.Bin(String, Object)
or
Bin.asBlob(String, Object)
is used in a write command
with an unrecognized object type.public static final Value NULL
public static final Value INFINITY
public static final Value WILDCARD
public static Value get(byte[] value)
public static Value get(byte[] value, int type)
public static Value get(byte[] value, int offset, int length)
public static Value get(ByteBuffer bb)
public static Value get(byte value)
public static Value get(int value)
public static Value get(long value)
public static Value get(double value)
public static Value get(float value)
public static Value get(boolean value)
public static Value get(List<? extends Map.Entry<?,?>> value, MapOrder mapOrder)
public static Value getAsHLL(byte[] value)
public static Value getAsNull()
public static Value get(Object value)
@Deprecated public static Value getFromRecordObject(Object value)
Use get(Object)
instead.
public abstract int estimateSize() throws AerospikeException
AerospikeException
public abstract int write(byte[] buffer, int offset) throws AerospikeException
AerospikeException
public abstract void pack(com.aerospike.client.util.Packer packer)
public void validateKeyType() throws AerospikeException
AerospikeException
- if type can't be used as a key.public abstract int getType()
public abstract Object getObject()
public abstract org.luaj.vm2.LuaValue getLuaValue(com.aerospike.client.lua.LuaInstance instance)
public int toInteger()
public long toLong()
Copyright © 2012–2022 Aerospike, Inc. All rights reserved.