Package com.aerospike.client
Class BatchRecord
java.lang.Object
com.aerospike.client.BatchRecord
- Direct Known Subclasses:
BatchDelete
,BatchRead
,BatchUDF
,BatchWrite
Batch key and record result.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionfinal boolean
Does this command contain a write operation.boolean
Is it possible that the write transaction may have completed even though an error occurred for this record.final Key
Key.Record result after batch command has completed.int
Result code for this returned record. -
Constructor Summary
ConstructorDescriptionBatchRecord
(Key key, boolean hasWrite) Initialize batch key.BatchRecord
(Key key, Record record, boolean hasWrite) Initialize batch key and record.BatchRecord
(Key key, Record record, int resultCode, boolean inDoubt, boolean hasWrite) Error constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
equals
(BatchRecord other) Optimized reference equality check to determine batch wire protocol repeat flag.getType()
Return batch command type.final void
prepare()
Prepare for upcoming batch call.final void
setError
(int resultCode, boolean inDoubt) Set error result.final void
Set record result.int
Return wire protocol size.toString()
Convert to string.
-
Field Details
-
key
Key. -
record
Record result after batch command has completed. Will be null if record was not found or an error occurred. SeeresultCode
. -
resultCode
public int resultCodeResult code for this returned record. SeeResultCode
. If notResultCode.OK
, the record will be null. -
inDoubt
public boolean inDoubtIs it possible that the write transaction may have completed even though an error occurred for this record. This may be the case when a client error occurs (like timeout) after the command was sent to the server. -
hasWrite
public final boolean hasWriteDoes this command contain a write operation. For internal use only.
-
-
Constructor Details
-
BatchRecord
Initialize batch key. -
BatchRecord
Initialize batch key and record. -
BatchRecord
Error constructor.
-
-
Method Details
-
prepare
public final void prepare()Prepare for upcoming batch call. Reset result fields because this instance might be reused. For internal use only. -
setRecord
Set record result. For internal use only. -
setError
public final void setError(int resultCode, boolean inDoubt) Set error result. For internal use only. -
toString
Convert to string. -
getType
Return batch command type. For internal use only. -
equals
Optimized reference equality check to determine batch wire protocol repeat flag. For internal use only. -
size
Return wire protocol size. For internal use only.
-