public final class BatchWritePolicy extends Object
Modifier and Type | Field and Description |
---|---|
CommitLevel |
commitLevel
Desired consistency guarantee when committing a transaction on the server.
|
boolean |
durableDelete
If the transaction results in a record deletion, leave a tombstone for the record.
|
int |
expiration
Record expiration.
|
Expression |
filterExp
Optional expression filter.
|
int |
generation
Expected generation.
|
GenerationPolicy |
generationPolicy
Qualify how to handle record writes based on record generation.
|
RecordExistsAction |
recordExistsAction
Qualify how to handle writes where the record already exists.
|
boolean |
sendKey
Send user defined key in addition to hash digest.
|
Constructor and Description |
---|
BatchWritePolicy()
Default constructor.
|
BatchWritePolicy(BatchWritePolicy other)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
setCommitLevel(CommitLevel commitLevel) |
void |
setDurableDelete(boolean durableDelete) |
void |
setExpiration(int expiration) |
void |
setFilterExp(Expression filterExp) |
void |
setGeneration(int generation) |
void |
setGenerationPolicy(GenerationPolicy generationPolicy) |
void |
setRecordExistsAction(RecordExistsAction recordExistsAction) |
void |
setSendKey(boolean sendKey) |
public Expression filterExp
BatchRecord.resultCode
is set to
ResultCode.FILTERED_OUT
.
If exists, this filter overrides the batch parent filter Policy.filterExp
for the specific key in batch commands that allow a different policy per key.
Otherwise, this filter is ignored.
Default: null
public RecordExistsAction recordExistsAction
Default: RecordExistsAction.UPDATE
public CommitLevel commitLevel
Default: CommitLevel.COMMIT_ALL
public GenerationPolicy generationPolicy
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
public int generation
0
. This field is only relevant when
generationPolicy is not NONE.
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
public int expiration
Expiration values:
Default: 0
public boolean durableDelete
Default: false (do not tombstone deleted records).
public boolean sendKey
Default: false (do not send the user defined key)
public BatchWritePolicy(BatchWritePolicy other)
public BatchWritePolicy()
public void setFilterExp(Expression filterExp)
public void setRecordExistsAction(RecordExistsAction recordExistsAction)
public void setCommitLevel(CommitLevel commitLevel)
public void setGenerationPolicy(GenerationPolicy generationPolicy)
public void setGeneration(int generation)
public void setExpiration(int expiration)
public void setDurableDelete(boolean durableDelete)
public void setSendKey(boolean sendKey)
Copyright © 2012–2024 Aerospike, Inc. All rights reserved.