Documentation

BatchWritePolicy
in package

BatchWritePolicy attributes used in batch write commands.

Table of Contents

Properties

$commit_level  : mixed
$durable_delete  : mixed
$expiration  : mixed
$filter_expression  : mixed
$generation  : mixed
$generation_policy  : mixed
$record_exists_action  : mixed

Methods

__construct()  : mixed
getCommitLevel()  : CommitLevel
GenerationPolicy qualifies how to handle record writes based on record generation. The default (NONE) indicates that the generation is not used to restrict writes.
getDurableDelete()  : bool
DurableDelete leaves a tombstone for the record if the transaction results in a record deletion.
getExpiration()  : Expiration
Expiration determines record expiration in seconds. Also known as TTL (Time-To-Live).
getFilterExpression()  : Expression|null
FilterExpression is optional expression filter. If FilterExpression exists and evaluates to false, the specific batch key request is not performed and BatchRecord#resultCode is set to types.FILTERED_OUT.
getGeneration()  : int
Expected generation. Generation is the number of times a record has been modified (including creation) on the server. If a write operation is creating a record, the expected generation would be 0. This field is only relevant when generationPolicy is not NONE.
getGenerationPolicy()  : GenerationPolicy
Desired consistency guarantee when committing a transaction on the server. The default (COMMIT_ALL) indicates that the server should wait for master and all replica commits to be successful before returning success to the client.
getRecordExistsAction()  : RecordExistsAction
RecordExistsAction qualifies how to handle writes where the record already exists.
setCommitLevel()  : mixed
setDurableDelete()  : mixed
setExpiration()  : mixed
setFilterExpression()  : mixed
setGeneration()  : mixed
setGenerationPolicy()  : mixed
setRecordExistsAction()  : mixed

Properties

Methods

getCommitLevel()

GenerationPolicy qualifies how to handle record writes based on record generation. The default (NONE) indicates that the generation is not used to restrict writes.

public getCommitLevel() : CommitLevel

The server does not support this field for UDF execute() calls. The read-modify-write usage model can still be enforced inside the UDF code itself.

Default: GenerationPolicy.NONE indicates that the generation is not used to restrict writes.

Return values
CommitLevel

getDurableDelete()

DurableDelete leaves a tombstone for the record if the transaction results in a record deletion.

public getDurableDelete() : bool

This prevents deleted records from reappearing after node failures. Valid for Aerospike Server Enterprise Edition 3.10+ only.

Return values
bool

getExpiration()

Expiration determines record expiration in seconds. Also known as TTL (Time-To-Live).

public getExpiration() : Expiration

Seconds record will live before being removed by the server. Expiration values: TTLServerDefault (0): Default to namespace configuration variable "default-ttl" on the server. TTLDontExpire (MaxUint32): Never expire for Aerospike 2 server versions >= 2.7.2 and Aerospike 3+ server TTLDontUpdate (MaxUint32 - 1): Do not change ttl when record is written. Supported by Aerospike server versions >= 3.10.1

0: Actual expiration in seconds.

Return values
Expiration

getFilterExpression()

FilterExpression is optional expression filter. If FilterExpression exists and evaluates to false, the specific batch key request is not performed and BatchRecord#resultCode is set to types.FILTERED_OUT.

public getFilterExpression() : Expression|null

Default: nil

Return values
Expression|null

getGeneration()

Expected generation. Generation is the number of times a record has been modified (including creation) on the server. If a write operation is creating a record, the expected generation would be 0. This field is only relevant when generationPolicy is not NONE.

public getGeneration() : int

The server does not support this field for UDF execute() calls. The read-modify-write usage model can still be enforced inside the UDF code itself.

Default: 0

Return values
int

getGenerationPolicy()

Desired consistency guarantee when committing a transaction on the server. The default (COMMIT_ALL) indicates that the server should wait for master and all replica commits to be successful before returning success to the client.

public getGenerationPolicy() : GenerationPolicy

Default: CommitLevel.COMMIT_ALL

Return values
GenerationPolicy

setFilterExpression()

public setFilterExpression(mixed $filter_expression) : mixed
Parameters
$filter_expression : mixed

setGenerationPolicy()

public setGenerationPolicy(mixed $generation_policy) : mixed
Parameters
$generation_policy : mixed

setRecordExistsAction()

public setRecordExistsAction(mixed $record_exists_action) : mixed
Parameters
$record_exists_action : mixed

        
On this page

Search results