|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.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. |
java.lang.String |
namespace
Namespace. |
java.lang.String |
setName
Optional set name. |
java.lang.Object |
userKey
Original user key. |
Constructor Summary | |
---|---|
Key(java.lang.String namespace,
byte[] digest)
Initialize key from namespace and digest. |
|
Key(java.lang.String namespace,
byte[] digest,
java.lang.String setName)
Initialize key from namespace, digest and optional set name. |
|
Key(java.lang.String namespace,
java.lang.String setName,
byte[] key)
Initialize key from namespace, optional set name and user key. |
|
Key(java.lang.String namespace,
java.lang.String setName,
int key)
Initialize key from namespace, optional set name and user key. |
|
Key(java.lang.String namespace,
java.lang.String setName,
long key)
Initialize key from namespace, optional set name and user key. |
|
Key(java.lang.String namespace,
java.lang.String setName,
java.lang.String key)
Initialize key from namespace, optional set name and user key. |
|
Key(java.lang.String namespace,
java.lang.String setName,
Value key)
Initialize key from namespace, optional set name and user key. |
Method Summary | |
---|---|
static byte[] |
computeDigest(java.lang.String setName,
Value key)
Generate unique server hash value from set name, key type and user defined key. |
boolean |
equals(java.lang.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 java.lang.String namespace
public final java.lang.String setName
public final byte[] digest
public final java.lang.Object userKey
Constructor Detail |
---|
public Key(java.lang.String namespace, java.lang.String setName, java.lang.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(java.lang.String namespace, java.lang.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(java.lang.String namespace, java.lang.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(java.lang.String namespace, java.lang.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(java.lang.String namespace, java.lang.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(java.lang.String namespace, byte[] digest, java.lang.String setName)
namespace
- namespacedigest
- unique server hash valuesetName
- optional set name, enter null when set does not existpublic Key(java.lang.String namespace, byte[] digest)
namespace
- namespacedigest
- unique server hash valueMethod Detail |
---|
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public static byte[] computeDigest(java.lang.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 |