|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.aerospike.client.Key
public final class Key
Unique record identifier. Records can be identified using a specified namespace, an optional set name, and a user defined key which must be unique within a set. Records can also be identified by namespace/digest which is the combination used on the server.
Field Summary | |
---|---|
byte[] |
digest
Unique server hash value generated from set name and user key. |
String |
namespace
Namespace. |
String |
setName
Optional set name. |
Object |
userKey
Original user key. |
Constructor Summary | |
---|---|
Key(String namespace,
byte[] digest)
Initialize key from namespace and digest. |
|
Key(String namespace,
byte[] digest,
String setName)
Initialize key from namespace, digest and optional set name. |
|
Key(String namespace,
String setName,
byte[] key)
Initialize key from namespace, optional set name and user key. |
|
Key(String namespace,
String setName,
byte[] key,
int offset,
int length)
Initialize key from namespace, optional set name and user key. |
|
Key(String namespace,
String setName,
int key)
Initialize key from namespace, optional set name and user key. |
|
Key(String namespace,
String setName,
long key)
Initialize key from namespace, optional set name and user key. |
|
Key(String namespace,
String setName,
String key)
Initialize key from namespace, optional set name and user key. |
|
Key(String namespace,
String setName,
Value key)
Initialize key from namespace, optional set name and user key. |
Method Summary | |
---|---|
static byte[] |
computeDigest(String setName,
Value key)
Generate unique server hash value from set name, key type and user defined key. |
boolean |
equals(Object obj)
Equality uses namespace and digest. |
int |
hashCode()
Hash lookup uses namespace and digest. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final String namespace
public final String setName
public final byte[] digest
public final Object userKey
Constructor Detail |
---|
public Key(String namespace, String setName, String key) throws AerospikeException
namespace
- namespacesetName
- optional set name, enter null when set does not existkey
- user defined unique identifier within set.
AerospikeException
- if digest computation failspublic Key(String namespace, String setName, byte[] key) throws AerospikeException
namespace
- namespacesetName
- optional set name, enter null when set does not existkey
- user defined unique identifier within set.
AerospikeException
- if digest computation failspublic Key(String namespace, String setName, byte[] key, int offset, int length) throws AerospikeException
namespace
- namespacesetName
- optional set name, enter null when set does not existkey
- user defined unique identifier within set.offset
- byte array segment offsetlength
- byte array segment length
AerospikeException
- if digest computation failspublic Key(String namespace, String setName, int key) throws AerospikeException
namespace
- namespacesetName
- optional set name, enter null when set does not existkey
- user defined unique identifier within set.
AerospikeException
- if digest computation failspublic Key(String namespace, String setName, long key) throws AerospikeException
namespace
- namespacesetName
- optional set name, enter null when set does not existkey
- user defined unique identifier within set.
AerospikeException
- if digest computation failspublic Key(String namespace, String setName, Value key) throws AerospikeException
namespace
- namespacesetName
- optional set name, enter null when set does not existkey
- user defined unique identifier within set.
AerospikeException
- if digest computation failspublic Key(String namespace, byte[] digest, String setName)
namespace
- namespacedigest
- unique server hash valuesetName
- optional set name, enter null when set does not existpublic Key(String namespace, byte[] digest)
namespace
- namespacedigest
- unique server hash valueMethod Detail |
---|
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public static byte[] computeDigest(String setName, Value key) throws AerospikeException
setName
- optional set name, enter null when set does not existkey
- record identifier, unique within set
AerospikeException
- if digest computation fails
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |