|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.zib.scalaris.operations.PartialReadOp
de.zib.scalaris.operations.ReadRandomFromListOp
public class ReadRandomFromListOp
Operation reading a random entry from a (non-empty) list value.
| Nested Class Summary | |
|---|---|
static class |
ReadRandomFromListOp.Result
Result type of random_from_list operations. |
| Constructor Summary | |
|---|---|
ReadRandomFromListOp(OtpErlangString key)
Constructor |
|
ReadRandomFromListOp(String key)
Constructor |
|
| Method Summary | |
|---|---|
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. |
String |
toString()
|
| Methods inherited from class de.zib.scalaris.operations.PartialReadOp |
|---|
getKey, getResult, getResultCompressed, setResult |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ReadRandomFromListOp(OtpErlangString key)
key - the key to readpublic ReadRandomFromListOp(String key)
key - the key to read| Method Detail |
|---|
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 not
public 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 exist
EmptyListException - if the stored value is an empty list but the op requires a
non-empty list
NotAListException - if the previously stored value was no list
UnknownException - if any other error occurs
public 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 exist
EmptyListException - if the stored value is an empty list but the op requires a
non-empty list
NotAListException - if the previously stored value was no list
UnknownException - if any other error occurspublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||