|
||||||||||
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.ReadSublistOp
public class ReadSublistOp
Operation reading a sublist from a value. Extracts a sublist of length Length starting at Start.
Nested Class Summary | |
---|---|
static class |
ReadSublistOp.Result
Result type of sublist operations. |
Constructor Summary | |
---|---|
ReadSublistOp(OtpErlangString key,
OtpErlangInt start,
OtpErlangInt length)
Constructor |
|
ReadSublistOp(String key,
int start,
int length)
Constructor |
Method Summary | |
---|---|
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()
|
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 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
)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 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 exist
NotAListException
- if the previously stored value was no list
UnknownException
- 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 exist
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 |