public abstract class RequestList extends Object
Modifier and Type | Method and Description |
---|---|
RequestList |
addAddDelOnList(OtpErlangString key,
OtpErlangList toAdd,
OtpErlangList toRemove)
Deprecated.
|
<T> RequestList |
addAddDelOnList(String key,
List<T> toAdd,
List<T> toRemove)
Deprecated.
|
RequestList |
addAddOnNr(OtpErlangString key,
OtpErlangDouble toAdd)
Deprecated.
|
RequestList |
addAddOnNr(OtpErlangString key,
OtpErlangLong toAdd)
Deprecated.
|
RequestList |
addAddOnNr(String key,
Double toAdd)
Deprecated.
|
<T extends Number> |
addAddOnNr(String key,
T toAdd)
Deprecated.
|
RequestList |
addCommit()
Adds a commit operation to the list of requests.
|
RequestList |
addOp(Operation op)
Adds a generic operation to the list of requests.
|
RequestList |
addRead(OtpErlangString key)
Deprecated.
|
RequestList |
addRead(String key)
Deprecated.
|
RequestList |
addTestAndSet(OtpErlangString key,
OtpErlangObject oldValue,
OtpErlangObject newValue)
Deprecated.
|
<OldT,NewT> |
addTestAndSet(String key,
OldT oldValue,
NewT newValue)
Deprecated.
|
RequestList |
addWrite(OtpErlangString key,
OtpErlangObject value)
Deprecated.
|
<T> RequestList |
addWrite(String key,
T value)
Deprecated.
|
CommitOp |
getCommit()
Returns the commit operation (if present).
|
List<Operation> |
getRequests()
Gets all operations of the request list.
|
boolean |
isCommit()
Returns whether the transactions contains a commit or not.
|
boolean |
isEmpty()
Checks whether the request list is empty.
|
int |
size()
Gets the number of requests in the list.
|
String |
toString() |
public RequestList addOp(Operation op) throws UnsupportedOperationException
op
- the operation to addRequestList
objectUnsupportedOperationException
- if the operation is unsupported, e.g. there may only be one
"commit" in a request list and no request after that@Deprecated public RequestList addRead(OtpErlangString key) throws UnsupportedOperationException
key
- the key to readRequestList
objectUnsupportedOperationException
- if the operation is unsupported, e.g. there may only be one
"commit" in a request list and no request after that@Deprecated public RequestList addRead(String key) throws UnsupportedOperationException
key
- the key to readRequestList
objectUnsupportedOperationException
- if the operation is unsupported, e.g. there may only be one
"commit" in a request list and no request after that@Deprecated public RequestList addWrite(OtpErlangString key, OtpErlangObject value) throws UnsupportedOperationException
key
- the key to write the value tovalue
- the value to writeRequestList
objectUnsupportedOperationException
- if the operation is unsupported, e.g. there may only be one
"commit" in a request list and no request after that@Deprecated public <T> RequestList addWrite(String key, T value) throws UnsupportedOperationException
T
- type of the value to writekey
- the key to write the value tovalue
- the value to writeRequestList
objectUnsupportedOperationException
- if the operation is unsupported, e.g. there may only be one
"commit" in a request list and no request after that@Deprecated public RequestList addAddDelOnList(OtpErlangString key, OtpErlangList toAdd, OtpErlangList toRemove) throws UnsupportedOperationException
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 listRequestList
objectUnsupportedOperationException
- if the operation is unsupported, e.g. there may only be one
"commit" in a request list and no request after that@Deprecated public <T> RequestList addAddDelOnList(String key, List<T> toAdd, List<T> toRemove) throws UnsupportedOperationException
T
- type of the value to writekey
- the key to write the value totoAdd
- a list of values to add to a listtoRemove
- a list of values to remove from a listRequestList
objectUnsupportedOperationException
- if the operation is unsupported, e.g. there may only be one
"commit" in a request list and no request after that@Deprecated public RequestList addAddOnNr(OtpErlangString key, OtpErlangLong toAdd) throws UnsupportedOperationException
key
- the key to write the value totoAdd
- the number to add to the number stored at keyRequestList
objectUnsupportedOperationException
- if the operation is unsupported, e.g. there may only be one
"commit" in a request list and no request after that@Deprecated public RequestList addAddOnNr(OtpErlangString key, OtpErlangDouble toAdd) throws UnsupportedOperationException
key
- the key to write the value totoAdd
- the number to add to the number stored at keyRequestList
objectUnsupportedOperationException
- if the operation is unsupported, e.g. there may only be one
"commit" in a request list and no request after that@Deprecated public <T extends Number> RequestList addAddOnNr(String key, T toAdd) throws UnsupportedOperationException
T
- type of the value to write; WARNING: the actual supported
types only include Integer
, Long
,
BigInteger
and Double
- see
ErlangValue.convertToErlang(Object)
.key
- the key to write the value totoAdd
- the number to add to the number stored at keyRequestList
objectUnsupportedOperationException
- if the operation is unsupported, e.g. there may only be one
"commit" in a request list and no request after that@Deprecated public RequestList addAddOnNr(String key, Double toAdd) throws UnsupportedOperationException
key
- the key to write the value totoAdd
- the number to add to the number stored at keyRequestList
objectUnsupportedOperationException
- if the operation is unsupported, e.g. there may only be one
"commit" in a request list and no request after that@Deprecated public RequestList addTestAndSet(OtpErlangString key, OtpErlangObject oldValue, OtpErlangObject newValue) throws UnsupportedOperationException
key
- the key to write the value tooldValue
- the old value to verifynewValue
- the new value to write of oldValue is correctRequestList
objectUnsupportedOperationException
- if the operation is unsupported, e.g. there may only be one
"commit" in a request list and no request after that@Deprecated public <OldT,NewT> RequestList addTestAndSet(String key, OldT oldValue, NewT newValue) throws UnsupportedOperationException
OldT
- the type of the stored (old) value. See ErlangValue
for a list of supported types.NewT
- the type of the (new) value to store. See ErlangValue
for a list of supported types.key
- the key to write the value tooldValue
- the old value to verifynewValue
- the new value to write of oldValue is correctRequestList
objectUnsupportedOperationException
- if the operation is unsupported, e.g. there may only be one
"commit" in a request list and no request after thatpublic RequestList addCommit() throws UnsupportedOperationException
RequestList
objectUnsupportedOperationException
- if the operation is unsupported, e.g. there may only be one
"commit" in a request list and no request after thatpublic boolean isCommit()
public CommitOp getCommit()
public boolean isEmpty()
public int size()
public List<Operation> getRequests()