Package vinzclortho :: Module core :: Class LocalStorage
[hide private]
[frames] | no frames]

Class LocalStorage

source code

object --+
         |
        LocalStorage

A wrapper that makes calls to a store.Store be executed by a worker, and return tangled.core.Deferred's

Instance Methods [hide private]
 
__init__(self, worker, name, partition, persistent)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__str__(self)
str(x)
source code
 
get(self, key) source code
 
put(self, key, value) source code
 
multi_put(self, kvlist, resolver) source code
 
delete(self, key) source code
 
_iterate_result(self, first, threshold, callback, result) source code
 
_iterate_error(self, failure) source code
 
_iterator_ready(self, threshold, callback, iterator) source code
 
get_all(self, threshold, callback)
This will call callback multiple times with a list of key/val tuples.
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, worker, name, partition, persistent)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

get_all(self, threshold, callback)

source code 

This will call callback multiple times with a list of key/val tuples. The callback will be called whenever threshold bytes is accumulated (and also when all key/val tuples have been gathered). If the storage is empty, the callback will be called with an empty list.

This does *not* return a Deferred!