|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.zib.scalaris.operations.AddOnNrOp
public class AddOnNrOp
Operation incrementing a numeric value.
| Constructor Summary | |
|---|---|
AddOnNrOp(OtpErlangString key,
OtpErlangDouble toAdd)
Constructor |
|
AddOnNrOp(OtpErlangString key,
OtpErlangLong toAdd)
Constructor |
|
AddOnNrOp(String key,
Double toAdd)
Constructor |
|
AddOnNrOp(String key,
T toAdd)
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 AddOnNrOp(OtpErlangString key,
OtpErlangLong toAdd)
key - the key to write the value totoAdd - the number to add to the number stored at key
public AddOnNrOp(OtpErlangString key,
OtpErlangDouble toAdd)
key - the key to write the value totoAdd - the number to add to the number stored at key
public AddOnNrOp(String key,
T toAdd)
key - the key to write the value totoAdd - the number to add to the number stored at key
public AddOnNrOp(String key,
Double toAdd)
key - the key to write the value totoAdd - the number to add to the number stored at key| Method Detail |
|---|
public OtpErlangObject getErlang(boolean compressed)
Operation
getErlang in interface Operationcompressed - 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)
OperationOperation.processResult().
setResult in interface OperationresultRaw - the resultcompressed - whether the value inside the result is compressed or notpublic OtpErlangObject getResult()
OperationOperation.setResult(OtpErlangObject, boolean).
getResult in interface Operationpublic boolean getResultCompressed()
OperationOperation.setResult(OtpErlangObject, boolean) is compressed or not.
getResultCompressed in interface Operation
public Object processResult()
throws UnknownException,
NotANumberException
OperationOperation.setResult(OtpErlangObject, boolean).
Note: the created value is not cached!
processResult in interface OperationUnknownException - if any other error occurs
NotANumberException - if the previously stored value was not a number
public Object processResultSingle()
throws AbortException,
NotANumberException,
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!
processResultSingle in interface TransactionSingleOpOperationAbortException - if a commit failed
NotANumberException - if the previously stored value was not a number
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 | |||||||||