Trees | Indices | Help |
|
---|
|
Write or read operations on scalaris inside a transaction.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
Inherited from |
|
Create a new object using the given connection
|
Issues multiple parallel requests to scalaris. Request lists can be created using new_req_list(). The returned list has the following form: [{'status': 'ok'} or {'status': 'ok', 'value': xxx} or {'status': 'fail', 'reason': 'timeout' or 'abort' or 'not_found'}]. Elements of this list can be processed with process_result_read() and process_result_write(). A commit (at the end of the request list) will be automatically checked for its success. |
Processes a result element from the list returned by req_list() which originated from a read operation. Returns the read value on success. Raises the appropriate exceptions if a failure occurred during the operation. Beware: lists of (small) integers may be (falsely) returned as a string - use str_to_list() to convert such strings. |
Processes a result element from the list returned by req_list() which originated from a write operation. Raises the appropriate exceptions if a failure occurred during the operation. |
Processes a result element from the list returned by req_list() which originated from a add_del_on_list operation. Raises the appropriate exceptions if a failure occurred during the operation. |
Processes a result element from the list returned by req_list() which originated from a add_on_nr operation. Raises the appropriate exceptions if a failure occurred during the operation. |
Processes a result element from the list returned by req_list() which originated from a test_and_set operation. Raises the appropriate exceptions if a failure occurred during the operation. |
Processes a result element from the list returned by req_list() which originated from a commit operation. Raises the appropriate exceptions if a failure occurred during the operation. |
Issues a read operation to scalaris, adds it to the current transaction and returns the result. Beware: lists of (small) integers may be (falsely) returned as a string - use str_to_list() to convert such strings. |
Issues a add_del_on_list operation to scalaris and adds it to the current transaction. Changes the list stored at the given key, i.e. first adds all items in to_add then removes all items in to_remove. Both, to_add and to_remove, must be lists. Assumes en empty list if no value exists at key. |
Issues a add_on_nr operation to scalaris and adds it to the current transaction. Changes the number stored at the given key, i.e. adds some value. Assumes 0 if no value exists at key. |
Issues a test_and_set operation to scalaris and adds it to the current transaction. Atomic test and set, i.e. if the old value at key is old_value, then write new_value. |
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu Sep 12 16:41:41 2019 | http://epydoc.sourceforge.net |