public final class Key extends Object
Modifier and Type | Field and Description |
---|---|
byte[] |
digest
Unique server hash value generated from set name and user key.
|
String |
namespace
Namespace.
|
String |
setName
Optional set name.
|
Value |
userKey
Original user key.
|
Constructor and Description |
---|
Key(String namespace,
byte[] digest)
|
Key(String namespace,
byte[] digest,
String setName,
Value userKey)
Initialize key from namespace, digest, optional set name and optional userKey.
|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
String |
toString() |
public final String namespace
public final String setName
public final byte[] digest
public final Value userKey
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 lengthAerospikeException
- 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, Value userKey)
namespace
- namespacedigest
- unique server hash valuesetName
- optional set name, enter null when set does not existuserKey
- optional original user key (not hash digest).public Key(String namespace, byte[] digest)
namespace
- namespacedigest
- unique server hash valuepublic int hashCode()
public boolean equals(Object obj)
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 setAerospikeException
- if digest computation failsCopyright © 2012–2015 Aerospike, Inc. All rights reserved.