public class BatchRecord extends Object
Modifier and Type | Class and Description |
---|---|
static class |
BatchRecord.Type
Batch command type.
|
Modifier and Type | Field and Description |
---|---|
boolean |
hasWrite
Does this command contain a write operation.
|
boolean |
inDoubt
Is it possible that the write transaction may have completed even though an error
occurred for this record.
|
Key |
key
Key.
|
Record |
record
Record result after batch command has completed.
|
int |
resultCode
Result code for this returned record.
|
Constructor and Description |
---|
BatchRecord(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.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(BatchRecord other)
Optimized reference equality check to determine batch wire protocol repeat flag.
|
BatchRecord.Type |
getType()
Return batch command type.
|
void |
prepare()
Prepare for upcoming batch call.
|
void |
setError(int resultCode,
boolean inDoubt)
Set error result.
|
void |
setRecord(Record record)
Set record result.
|
int |
size(Policy parentPolicy)
Return wire protocol size.
|
String |
toString()
Convert to string.
|
public final Key key
public Record record
resultCode
.public int resultCode
ResultCode
.
If not ResultCode.OK
, the record will be null.public boolean inDoubt
public final boolean hasWrite
public BatchRecord(Key key, boolean hasWrite)
public BatchRecord(Key key, Record record, boolean hasWrite)
public final void prepare()
public final void setRecord(Record record)
public final void setError(int resultCode, boolean inDoubt)
public BatchRecord.Type getType()
public boolean equals(BatchRecord other)
public int size(Policy parentPolicy)
Copyright © 2012–2024 Aerospike, Inc. All rights reserved.