public class ReadSublistOp extends PartialReadOp
Modifier and Type | Class and Description |
---|---|
static class |
ReadSublistOp.Result
Result type of sublist operations.
|
Constructor and Description |
---|
ReadSublistOp(OtpErlangString key,
OtpErlangInt start,
OtpErlangInt length)
Constructor
|
ReadSublistOp(String key,
int start,
int length)
Constructor
|
Modifier and Type | Method and Description |
---|---|
OtpErlangObject |
getErlang(boolean compressed)
Gets the erlang representation of the operation.
|
ReadSublistOp.Result |
processResult()
Processes the result set by
Operation.setResult(OtpErlangObject, boolean) . |
ReadSublistOp.Result |
processResultSingle()
Processes the result set by
Operation.setResult(OtpErlangObject, boolean)
assuming that operation was committed. |
String |
toString() |
getKey, getResult, getResultCompressed, setResult
public ReadSublistOp(OtpErlangString key, OtpErlangInt start, OtpErlangInt length)
key
- the key to readstart
- the start of the sublist (may be negative - see
ReadSublistOp
)length
- the length of the sublist (may be negative - see
ReadSublistOp
)public ReadSublistOp(String key, int start, int length)
key
- the key to readstart
- the start of the sublist (may be negative - see
ReadSublistOp
)length
- the length of the sublist (may be negative - see
ReadSublistOp
)public OtpErlangObject getErlang(boolean compressed)
Operation
compressed
- whether the value part in the term should be encoded, i.e.
compressed into an Erlang binary, or notpublic ReadSublistOp.Result processResult() throws NotFoundException, NotAListException, UnknownException
Operation
Operation.setResult(OtpErlangObject, boolean)
.
Note: the created value is not cached!NotFoundException
- if the requested key does not existNotAListException
- if the previously stored value was no listUnknownException
- if any other error occurspublic ReadSublistOp.Result processResultSingle() throws NotFoundException, NotAListException, UnknownException
TransactionSingleOpOperation
Operation.setResult(OtpErlangObject, boolean)
assuming that operation was committed.
In contrast to Operation.processResult()
operations like WriteOp
will throw a proper AbortException
for their commit part instead
of an UnknownException
.
Note: the created value is not cached!NotFoundException
- if the requested key does not existNotAListException
- if the previously stored value was no listUnknownException
- if any other error occurs