aerospike-clj.policy
create-only-policy
(create-only-policy client expiration)
Create a write policy with CREATE_ONLY record exists action.
map->batch-policy
(map->batch-policy conf)
Create a (read) BatchPolicy
from a map. This function is slow due to possible reflection.
map->event-policy
(map->event-policy)
(map->event-policy conf)
Create an EventPolicy
from a map. Usage same as map->write-policy
.
map->policy
(map->policy conf)
Create a (read) Policy
from a map. Enumeration names should start with capitalized letter. This function is slow due to possible reflection.
map->write-policy
(map->write-policy conf)
Create a WritePolicy
from a map. Keys are strings identical to field names enum fields should start capitalized. This function is slow and involves reflection. For a faster creation use write-policy
which uses the client policy caching.
replace-only-policy
(replace-only-policy client expiration)
Create a write policy with REPLACE_ONLY record exists action. Fails if the record does not exists
set-policy
(set-policy client expiration)
Create a write policy with UPDATE record exists action. in case of new entry, create it in case the entry exists, update entry
update-only-policy
(update-only-policy client new-expiration)
Create a write policy with UPDATE_ONLY record exists action. The policy helps add/delete bins in records without replacing existing data.
update-policy
(update-policy client generation new-expiration)
Create a write policy with expiration
, expected generation
and EXPECT_GEN_EQUAL generation policy.
write-policy
(write-policy client expiration)
(write-policy client expiration record-exists-action)
Create a write policy to be passed to put methods via {:policy wp}
. Also used in update
and create
. The default policy in case the record exists is RecordExistsAction/REPLACE
.