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.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.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.StringValue
String value.
|
static class |
Value.ValueArray
Value array.
|
Modifier and Type | Field and Description |
---|---|
static boolean |
UseDoubleType
Should the client use the new double floating point particle type supported by Aerospike
server versions >= 3.6.0.
|
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 offset,
int length)
Get byte segment or null value instance.
|
static Value |
get(double value)
Get double value 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(long value)
Get long value instance.
|
static Value |
get(Map<?,?> value)
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(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 |
getAsNull()
Get null value instance.
|
static Value |
getFromRecordObject(Object value)
Get value from Record object.
|
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 UseDoubleType
If false, the old method using an long particle type is used instead.
public static Value get(byte[] value)
public static Value get(byte[] value, int offset, int length)
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 getAsNull()
public static Value get(Object value)
public static Value getFromRecordObject(Object value)
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–2018 Aerospike, Inc. All rights reserved.