Liking cljdoc? Tell your friends :D

aerospike-clj.client


ClientEventscljprotocol

Continuation functions that are registered when an async DB operation is called. The DB passed is an IAerospikeClient instance. The value returned from those function will be the value of the returned deferred from the async operation.

Continuation functions that are registered when an async DB operation is called.
The DB passed is an `IAerospikeClient` instance.
The value returned from those function will be the value of the returned deferred from the async operation.

on-failureclj

(on-failure _ op-name op-ex index op-start-time db)

A continuation function. Registered on the operation future and called when operations fails.

A continuation function. Registered on the operation future and called when operations fails.

on-successclj

(on-success _ op-name op-result index op-start-time db)

A continuation function. Registered on the operation future and called when operations succeeds.

A continuation function. Registered on the operation future and called when operations succeeds.
sourceraw docstring

createclj

(create db index set-name data expiration)
(create db index set-name data expiration conf)

put with a create-only policy

`put` with a create-only policy
sourceraw docstring

create-clientclj

(create-client hosts client-policy)

Returns the Java AerospikeClient instance. To build the Clojure IAerospikeClient one, use init-simple-aerospike-client.

Returns the Java `AerospikeClient` instance. To build the Clojure `IAerospikeClient` one,
use `init-simple-aerospike-client`.
sourceraw docstring

create-event-loopsclj

(create-event-loops conf)

Called internally to create the event loops of for the client. Can also be used to share event loops between several clients.

Called internally to create the event loops of for the client.
Can also be used to share event loops between several clients.
sourceraw docstring

deleteclj

(delete db index set-name)
(delete db index set-name conf)

Delete the record stored for key <index>. Returns async true/false for deletion success (hit).

Delete the record stored for key <index>.
Returns async true/false for deletion success (hit).
sourceraw docstring

EPOCHclj

source

exists?clj

(exists? db index set-name)
(exists? db index set-name conf)

Test if an index exists.

Test if an index exists.
sourceraw docstring

expiry-unixclj

(expiry-unix ttl)

Used to convert Aerospike style returned TTLS to standard UNIX EPOCH.

Used to convert Aerospike style returned TTLS to standard UNIX EPOCH.
sourceraw docstring

get-cluster-statsclj

(get-cluster-stats db)

For each client, return a vector of [metric-name metric-val] 2-tuples. The metric name is a dot separated string that should be convenient for reporting to statsd/graphite. All values are gauges.

For each client, return a vector of [metric-name metric-val] 2-tuples.
The metric name is a dot separated string that should be convenient for
reporting to statsd/graphite. All values are gauges.
sourceraw docstring

get-multipleclj

(get-multiple db indices sets)
(get-multiple db indices sets conf)

Returns a (future) sequence of AerospikeRecords returned by get-single with records in corresponding places to the required keys. Indices and sets should be sequences. The conf map is passed to all get-single invocations.

Returns a (future) sequence of AerospikeRecords returned by `get-single`
with records in corresponding places to the required keys. Indices and sets should be sequences.
The `conf` map is passed to all `get-single` invocations.
sourceraw docstring

get-singleclj

(get-single db index set-name)
(get-single db index set-name conf)

Returns a single record: (transcoder AerospikeRecord). The default transcoder is identity. Pass a :policy in conf to use a non-default ReadPolicy

Returns a single record: `(transcoder AerospikeRecord)`. The default transcoder is `identity`.
Pass a `:policy` in `conf` to use a non-default `ReadPolicy`
sourceraw docstring

get-single-no-metaclj

(get-single-no-meta db index set-name)

Shorthand to return a single record payload only.

Shorthand to return a single record payload only.
sourceraw docstring

healthy?clj

(healthy? db operation-timeout-ms)

Returns true iff the cluster is reachable and can take reads and writes. Uses __health-check set to avoid data collisions. operation-timeout-ms is for total timeout of reads (including 2 retries) so an small over estimation is advised to avoid false negatives.

Returns true iff the cluster is reachable and can take reads and writes.
Uses __health-check set to avoid data collisions. `operation-timeout-ms` is for total timeout of reads
(including 2 retries) so an small over estimation is advised to avoid false negatives.
sourceraw docstring

IAerospikeClientcljprotocol

get-all-clientsclj

(get-all-clients _)

Returns a sequence of all AerospikeClient objects.

Returns a sequence of all AerospikeClient objects.

get-clientclj

(get-client ac)
(get-client ac index)

Returns the relevant AerospikeClient object for the specific shard

Returns the relevant AerospikeClient object for the specific shard
source

init-simple-aerospike-clientclj

(init-simple-aerospike-client hosts aero-ns)
(init-simple-aerospike-client hosts aero-ns conf)

hosts should be a seq of known hosts to bootstrap from.

hosts should be a seq of known hosts to bootstrap from.
sourceraw docstring

MAX_KEY_LENGTHclj

source

operateclj

(operate db index set-name expiration operations)
(operate db index set-name expiration operations conf)

Asynchronously perform multiple read/write operations on a single key in one batch call. This method registers the command with an event loop and returns. The event loop thread will process the command and send the results to the listener. commands is a sequence of Aerospike CDT operations.

Asynchronously perform multiple read/write operations on a single key in one batch call.
This method registers the command with an event loop and returns. The event loop thread
will process the command and send the results to the listener.
`commands` is a sequence of Aerospike CDT operations.
sourceraw docstring

putclj

(put db index set-name data expiration)
(put db index set-name data expiration conf)

Writes data into a record with the key index, with the ttl of expiration seconds. index should be string. Pass a function in (:trascoder conf) to modify data before it is sent to the DB. Pass a WritePolicy in (:policy conf) to uses the non-default policy.

Writes `data` into a record with the key `index`, with the ttl of `expiration` seconds.
`index` should be string. Pass a function in `(:trascoder conf)` to modify `data` before it
is sent to the DB.
Pass a `WritePolicy` in `(:policy conf)` to uses the non-default policy.
sourceraw docstring

put-multipleclj

(put-multiple db indices set-names payloads expirations)
(put-multiple db indices set-names payloads expirations conf)

Put multiple payloads by invoking put. All arguments should be mutually corresponding sequences.

Put multiple payloads by invoking `put`. All arguments should be mutually
corresponding sequences.
sourceraw docstring

stop-aerospike-clientclj

(stop-aerospike-client db)

gracefully stop a client, waiting until all async operations finish.

gracefully stop a client, waiting until all async operations finish.
sourceraw docstring

touchclj

(touch db index set-name expiration)

Updates the ttl of the record stored under at index to expiration seconds from now. Expects records to exist.

Updates the ttl of the record stored under at `index` to `expiration` seconds from now.
Expects records to exist.
sourceraw docstring

updateclj

(update db index set-name new-record generation new-expiration)
(update db index set-name new-record generation new-expiration conf)

Writing a new value for the key index. Generation: the expected modification count of the record (i.e. how many times was it modified before my current action). Pass a function in (:trascoder conf) to modify data before it is sent to the DB.

Writing a new value for the key `index`.
Generation: the expected modification count of the record (i.e. how many times was it
modified before my current action). Pass a function in `(:trascoder conf)` to modify
`data` before it is sent to the DB.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close