Key Class

Aerospike
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.
Inheritance Hierarchy

SystemObject
  Aerospike.ClientKey

Namespace:  Aerospike.Client
Assembly:  AerospikeClient (in AerospikeClient.dll) Version: 5.1.1.0 (5.1.1)
Syntax

C#
public sealed class Key

The Key type exposes the following members.

Constructors

  NameDescription
Public methodKey(String, String, Value)
Initialize key from namespace, optional set name and user key. The set name and user defined key are converted to a digest before sending to the server. The user key is not used or returned by the server by default. If the user key needs to persist on the server, use one of the following methods:
  • Set "WritePolicy.sendKey" to true. In this case, the key will be sent to the server for storage on writes and retrieved on multi-record scans and queries.
  • Explicitly store and retrieve the key in a bin.
Public methodKey(String, String, Boolean)
Initialize key from namespace, optional set name and user key. The set name and user defined key are converted to a digest before sending to the server. The user key is not used or returned by the server by default. If the user key needs to persist on the server, use one of the following methods:
  • Set "WritePolicy.sendKey" to true. In this case, the key will be sent to the server for storage on writes and retrieved on multi-record scans and queries.
  • Explicitly store and retrieve the key in a bin.
Public methodKey(String, String, Byte)
Initialize key from namespace, optional set name and user key. The set name and user defined key are converted to a digest before sending to the server. The user key is not used or returned by the server by default. If the user key needs to persist on the server, use one of the following methods:
  • Set "WritePolicy.sendKey" to true. In this case, the key will be sent to the server for storage on writes and retrieved on multi-record scans and queries.
  • Explicitly store and retrieve the key in a bin.
Public methodKey(String, String, Byte)
Initialize key from namespace, optional set name and user key. The set name and user defined key are converted to a digest before sending to the server. The user key is not used or returned by the server by default. If the user key needs to persist on the server, use one of the following methods:
  • Set "WritePolicy.sendKey" to true. In this case, the key will be sent to the server for storage on writes and retrieved on multi-record scans and queries.
  • Explicitly store and retrieve the key in a bin.
Public methodKey(String, String, Int16)
Initialize key from namespace, optional set name and user key. The set name and user defined key are converted to a digest before sending to the server. The user key is not used or returned by the server by default. If the user key needs to persist on the server, use one of the following methods:
  • Set "WritePolicy.sendKey" to true. In this case, the key will be sent to the server for storage on writes and retrieved on multi-record scans and queries.
  • Explicitly store and retrieve the key in a bin.
Public methodKey(String, String, Int32)
Initialize key from namespace, optional set name and user key. The set name and user defined key are converted to a digest before sending to the server. The user key is not used or returned by the server by default. If the user key needs to persist on the server, use one of the following methods:
  • Set "WritePolicy.sendKey" to true. In this case, the key will be sent to the server for storage on writes and retrieved on multi-record scans and queries.
  • Explicitly store and retrieve the key in a bin.
Public methodKey(String, String, Int64)
Initialize key from namespace, optional set name and user key. The set name and user defined key are converted to a digest before sending to the server. The user key is not used or returned by the server by default. If the user key needs to persist on the server, use one of the following methods:
  • Set "WritePolicy.sendKey" to true. In this case, the key will be sent to the server for storage on writes and retrieved on multi-record scans and queries.
  • Explicitly store and retrieve the key in a bin.
Public methodKey(String, String, SByte)
Initialize key from namespace, optional set name and user key. The set name and user defined key are converted to a digest before sending to the server. The user key is not used or returned by the server by default. If the user key needs to persist on the server, use one of the following methods:
  • Set "WritePolicy.sendKey" to true. In this case, the key will be sent to the server for storage on writes and retrieved on multi-record scans and queries.
  • Explicitly store and retrieve the key in a bin.
Public methodKey(String, String, String)
Initialize key from namespace, optional set name and user key. The set name and user defined key are converted to a digest before sending to the server. The user key is not used or returned by the server by default. If the user key needs to persist on the server, use one of the following methods:
  • Set "WritePolicy.sendKey" to true. In this case, the key will be sent to the server for storage on writes and retrieved on multi-record scans and queries.
  • Explicitly store and retrieve the key in a bin.
Public methodKey(String, String, UInt16)
Initialize key from namespace, optional set name and user key. The set name and user defined key are converted to a digest before sending to the server. The user key is not used or returned by the server by default. If the user key needs to persist on the server, use one of the following methods:
  • Set "WritePolicy.sendKey" to true. In this case, the key will be sent to the server for storage on writes and retrieved on multi-record scans and queries.
  • Explicitly store and retrieve the key in a bin.
Public methodKey(String, String, UInt32)
Initialize key from namespace, optional set name and user key. The set name and user defined key are converted to a digest before sending to the server. The user key is not used or returned by the server by default. If the user key needs to persist on the server, use one of the following methods:
  • Set "WritePolicy.sendKey" to true. In this case, the key will be sent to the server for storage on writes and retrieved on multi-record scans and queries.
  • Explicitly store and retrieve the key in a bin.
Public methodKey(String, String, UInt64)
Initialize key from namespace, optional set name and user key. The set name and user defined key are converted to a digest before sending to the server. The user key is not used or returned by the server by default. If the user key needs to persist on the server, use one of the following methods:
  • Set "WritePolicy.sendKey" to true. In this case, the key will be sent to the server for storage on writes and retrieved on multi-record scans and queries.
  • Explicitly store and retrieve the key in a bin.
Public methodKey(String, Byte, String, Value)
Initialize key from namespace, digest, optional set name and optional userKey.
Public methodKey(String, String, Byte, Int32, Int32)
Initialize key from namespace, optional set name and user key. The set name and user defined key are converted to a digest before sending to the server. The user key is not used or returned by the server by default. If the user key needs to persist on the server, use one of the following methods:
  • Set "WritePolicy.sendKey" to true. In this case, the key will be sent to the server for storage on writes and retrieved on multi-record scans and queries.
  • Explicitly store and retrieve the key in a bin.
Top
Methods

  NameDescription
Public methodStatic memberComputeDigest
Generate unique server hash value from set name, key type and user defined key. The hash function is RIPEMD-160 (a 160 bit hash).
Public methodEquals
Equality uses namespace and digest.
(Overrides ObjectEquals(Object).)
Public methodGetHashCode
Hash lookup uses namespace and digest.
(Overrides ObjectGetHashCode.)
Public methodToString
Return key elements in string format.
(Overrides ObjectToString.)
Top
Fields

  NameDescription
Public fielddigest
Unique server hash value generated from set name and user key.
Public fieldns
Namespace. Equivalent to database name.
Public fieldsetName
Optional set name. Equivalent to database table.
Public fielduserKey
Original user key. This key is immediately converted to a hash digest. This key is not used or returned by the server by default. If the user key needs to persist on the server, use one of the following methods:
  • Set "WritePolicy.sendKey" to true. In this case, the key will be sent to the server for storage on writes and retrieved on multi-record scans and queries.
  • Explicitly store and retrieve the key in a bin.
Top
See Also

Reference