|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.zib.scalaris.operations.AddDelOnListOp
public class AddDelOnListOp
Operation appending to / removing from a list.
Constructor Summary | |
---|---|
AddDelOnListOp(OtpErlangString key,
OtpErlangList toAdd,
OtpErlangList toRemove)
Constructor |
|
AddDelOnListOp(String key,
List<T> toAdd,
List<T> toRemove)
Constructor |
Method Summary | |
---|---|
OtpErlangObject |
getErlang(boolean compressed)
Gets the erlang representation of the operation. |
OtpErlangString |
getKey()
Gets the key the operation is working on (if available) |
OtpErlangObject |
getResult()
Gets the (raw Erlang) result set via Operation.setResult(OtpErlangObject, boolean) . |
boolean |
getResultCompressed()
Determines if the result set via Operation.setResult(OtpErlangObject, boolean) is compressed or not. |
Object |
processResult()
Processes the result set by Operation.setResult(OtpErlangObject, boolean) . |
Object |
processResultSingle()
Processes the result set by Operation.setResult(OtpErlangObject, boolean)
assuming that operation was committed. |
void |
setResult(OtpErlangObject resultRaw,
boolean compressed)
Sets the raw erlang result value. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AddDelOnListOp(OtpErlangString key, OtpErlangList toAdd, OtpErlangList toRemove)
key
- the key to write the value totoAdd
- a list of values to add to a listtoRemove
- a list of values to remove from a listpublic AddDelOnListOp(String key, List<T> toAdd, List<T> toRemove)
key
- the key to write the value totoAdd
- a list of values to add to a listtoRemove
- a list of values to remove from a listMethod Detail |
---|
public OtpErlangObject getErlang(boolean compressed)
Operation
getErlang
in interface Operation
compressed
- whether the value part in the term should be encoded, i.e.
compressed into an Erlang binary, or not
public OtpErlangString getKey()
Operation
getKey
in interface Operation
public void setResult(OtpErlangObject resultRaw, boolean compressed)
Operation
Operation.processResult()
.
setResult
in interface Operation
resultRaw
- the resultcompressed
- whether the value inside the result is compressed or notpublic OtpErlangObject getResult()
Operation
Operation.setResult(OtpErlangObject, boolean)
.
getResult
in interface Operation
public boolean getResultCompressed()
Operation
Operation.setResult(OtpErlangObject, boolean)
is compressed or not.
getResultCompressed
in interface Operation
public Object processResult() throws UnknownException, NotAListException
Operation
Operation.setResult(OtpErlangObject, boolean)
.
Note: the created value is not cached!
processResult
in interface Operation
UnknownException
- if any other error occurs
NotAListException
- if the previously stored value was no listpublic Object processResultSingle() throws AbortException, 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!
processResultSingle
in interface TransactionSingleOpOperation
AbortException
- if a commit failed
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 |