Operation, TransactionOperation, TransactionSingleOpOperationpublic class WriteOp extends java.lang.Object implements TransactionOperation, TransactionSingleOpOperation
| Constructor | Description |
|---|---|
WriteOp(com.ericsson.otp.erlang.OtpErlangString key,
com.ericsson.otp.erlang.OtpErlangObject value) |
Constructor
|
WriteOp(java.lang.String key,
T value) |
Constructor
|
| Modifier and Type | Method | Description |
|---|---|---|
com.ericsson.otp.erlang.OtpErlangObject |
getErlang(boolean compressed) |
Gets the erlang representation of the operation.
|
com.ericsson.otp.erlang.OtpErlangString |
getKey() |
Gets the key the operation is working on (if available)
|
com.ericsson.otp.erlang.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. |
java.lang.Object |
processResult() |
Processes the result set by
Operation.setResult(OtpErlangObject, boolean). |
java.lang.Object |
processResultSingle() |
Processes the result set by
Operation.setResult(OtpErlangObject, boolean)
assuming that operation was committed. |
void |
setResult(com.ericsson.otp.erlang.OtpErlangObject resultRaw,
boolean compressed) |
Sets the raw erlang result value.
|
java.lang.String |
toString() |
public WriteOp(com.ericsson.otp.erlang.OtpErlangString key,
com.ericsson.otp.erlang.OtpErlangObject value)
key - the key to write the value tovalue - the value to writepublic WriteOp(java.lang.String key,
T value)
key - the key to write the value tovalue - the value to writepublic com.ericsson.otp.erlang.OtpErlangObject getErlang(boolean compressed)
Operationpublic com.ericsson.otp.erlang.OtpErlangString getKey()
Operationpublic void setResult(com.ericsson.otp.erlang.OtpErlangObject resultRaw,
boolean compressed)
OperationOperation.processResult().public com.ericsson.otp.erlang.OtpErlangObject getResult()
OperationOperation.setResult(OtpErlangObject, boolean).public boolean getResultCompressed()
OperationOperation.setResult(OtpErlangObject, boolean) is compressed or not.getResultCompressed in interface Operationpublic java.lang.Object processResult()
throws UnknownException
OperationOperation.setResult(OtpErlangObject, boolean).
Note: the created value is not cached!processResult in interface OperationUnknownException - if any other error occurspublic java.lang.Object processResultSingle()
throws AbortException,
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 failedUnknownException - if any other error occurspublic java.lang.String toString()
toString in class java.lang.Object