public abstract class Value extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Value.BlobValue
Blob value.
|
static class |
Value.ByteSegmentValue
Byte segment value.
|
static class |
Value.BytesValue
Byte array value.
|
static class |
Value.DoubleValue
Double value.
|
static class |
Value.FloatValue
Float 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.
|
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(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(long value)
Get long 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 |
getAsList(List<?> value)
Get list or null value instance.
|
static Value |
getAsMap(Map<?,?> value)
Get map or null value instance.
|
static Value |
getAsNull()
Get null value instance.
|
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 Value get(byte[] value)
public static Value get(byte[] value, int offset, int length)
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 getAsList(List<?> value)
public static Value getAsMap(Map<?,?> value)
public static Value getAsNull()
public static Value get(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) throws IOException
IOException
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–2015 Aerospike, Inc. All rights reserved.