Operation, TransactionOperation, TransactionSingleOpOperationpublic class ReadRandomFromListOp extends PartialReadOp
| Modifier and Type | Class | Description |
|---|---|---|
static class |
ReadRandomFromListOp.Result |
Result type of random_from_list operations.
|
| Constructor | Description |
|---|---|
ReadRandomFromListOp(com.ericsson.otp.erlang.OtpErlangString key) |
Constructor
|
ReadRandomFromListOp(java.lang.String key) |
Constructor
|
| Modifier and Type | Method | Description |
|---|---|---|
com.ericsson.otp.erlang.OtpErlangObject |
getErlang(boolean compressed) |
Gets the erlang representation of the operation.
|
ReadRandomFromListOp.Result |
processResult() |
Processes the result set by
Operation.setResult(OtpErlangObject, boolean). |
ReadRandomFromListOp.Result |
processResultSingle() |
Processes the result set by
Operation.setResult(OtpErlangObject, boolean)
assuming that operation was committed. |
java.lang.String |
toString() |
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetKey, getResult, getResultCompressed, setResultpublic ReadRandomFromListOp(com.ericsson.otp.erlang.OtpErlangString key)
key - the key to readpublic ReadRandomFromListOp(java.lang.String key)
key - the key to readpublic com.ericsson.otp.erlang.OtpErlangObject getErlang(boolean compressed)
Operationcompressed - whether the value part in the term should be encoded, i.e.
compressed into an Erlang binary, or notpublic ReadRandomFromListOp.Result processResult() throws NotFoundException, EmptyListException, NotAListException, UnknownException
OperationOperation.setResult(OtpErlangObject, boolean).
Note: the created value is not cached!NotFoundException - if the requested key does not existEmptyListException - if the stored value is an empty list but the op requires a
non-empty listNotAListException - if the previously stored value was no listUnknownException - if any other error occurspublic ReadRandomFromListOp.Result processResultSingle() throws NotFoundException, EmptyListException, NotAListException, UnknownException
TransactionSingleOpOperationOperation.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 existEmptyListException - if the stored value is an empty list but the op requires a
non-empty listNotAListException - if the previously stored value was no listUnknownException - if any other error occurspublic java.lang.String toString()
toString in class java.lang.Object