Module scalaris :: Class ReplicatedDHT
[hide private]
[frames] | no frames]

Class ReplicatedDHT

source code


Non-transactional operations on the replicated DHT of scalaris

Instance Methods [hide private]
 
__init__(self, conn=None)
Create a new object using the given connection.
source code
 
delete(self, key, timeout=2000)
Tries to delete the value at the given key.
source code
 
get_last_delete_result(self)
Returns the result of the last call to delete().
source code
 
nop(self, value)
No operation (may be used for measuring the JSON overhead).
source code
 
close_connection(self)
Close the connection to scalaris (it will automatically be re-opened on the next request).
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, conn=None)
(Constructor)

source code 

Create a new object using the given connection.

Overrides: object.__init__

delete(self, key, timeout=2000)

source code 

Tries to delete the value at the given key.

WARNING: This function can lead to inconsistent data (e.g. deleted items can re-appear). Also when re-creating an item the version before the delete can re-appear.

get_last_delete_result(self)

source code 

Returns the result of the last call to delete().

NOTE: This function traverses the result list returned by scalaris and therefore takes some time to process. It is advised to store the returned result object once generated.