![]() |
ATLAS Offline Software
|
Classes | |
class | CacheStats |
Public Member Functions | |
def | __init__ (self, func, size, verify, deepCopy) |
def | getInfo (self) |
def | printStats (cls) |
def | suspendCaching (cls) |
def | resumeCaching (cls) |
def | clearCache (cls) |
def | __get__ (self, obj, objtype) |
def | __call__ (self, *args, **kwargs) |
def | __del__ (self) |
Static Public Attributes | |
int | VERIFY_NOTHING = 0 |
int | VERIFY_HASH = 1 |
Private Member Functions | |
def | _getHash (x) |
def | _evict (x) |
def | _evictAll (self) |
def | _callImpl (self, *args, **kwargs) |
Private Attributes | |
_maxSize | |
_func | |
_cache | |
_resultCache | |
_verify | |
_deepcopy | |
_memoize | |
Static Private Attributes | |
bool | _memoize = True |
_stats | |
Class for use in function decorators, implements memoization. Instances are callable objects that use the hash value calculated from positional and keyword arguments to implement memoization. Methods for suspending and resuming memoization are provided.
Definition at line 38 of file AccumulatorCache.py.
def python.AccumulatorCache.AccumulatorDecorator.__init__ | ( | self, | |
func, | |||
size, | |||
verify, | |||
deepCopy | |||
) |
See AccumulatorCache decorator for documentation of arguments.
Definition at line 61 of file AccumulatorCache.py.
def python.AccumulatorCache.AccumulatorDecorator.__del__ | ( | self | ) |
Definition at line 224 of file AccumulatorCache.py.
def python.AccumulatorCache.AccumulatorDecorator.__call__ | ( | self, | |
* | args, | ||
** | kwargs | ||
) |
Definition at line 144 of file AccumulatorCache.py.
def python.AccumulatorCache.AccumulatorDecorator.__get__ | ( | self, | |
obj, | |||
objtype | |||
) |
Support instance methods.
Definition at line 140 of file AccumulatorCache.py.
|
private |
Implementation of __call__. Returns: (result, cacheHit)
Definition at line 164 of file AccumulatorCache.py.
|
private |
Called when x is removed from the cache
Definition at line 128 of file AccumulatorCache.py.
|
private |
Definition at line 136 of file AccumulatorCache.py.
|
private |
Definition at line 119 of file AccumulatorCache.py.
def python.AccumulatorCache.AccumulatorDecorator.clearCache | ( | cls | ) |
def python.AccumulatorCache.AccumulatorDecorator.getInfo | ( | self | ) |
Return a dictionary with information about the cache size and cache usage
Definition at line 75 of file AccumulatorCache.py.
def python.AccumulatorCache.AccumulatorDecorator.printStats | ( | cls | ) |
Print cache statistics
Definition at line 84 of file AccumulatorCache.py.
def python.AccumulatorCache.AccumulatorDecorator.resumeCaching | ( | cls | ) |
Resume memoization for all instances of AccumulatorDecorator.
Definition at line 105 of file AccumulatorCache.py.
def python.AccumulatorCache.AccumulatorDecorator.suspendCaching | ( | cls | ) |
Suspend memoization for all instances of AccumulatorDecorator.
Definition at line 100 of file AccumulatorCache.py.
|
private |
Definition at line 67 of file AccumulatorCache.py.
|
private |
Definition at line 70 of file AccumulatorCache.py.
|
private |
Definition at line 66 of file AccumulatorCache.py.
|
private |
Definition at line 65 of file AccumulatorCache.py.
|
staticprivate |
Definition at line 47 of file AccumulatorCache.py.
|
private |
Definition at line 102 of file AccumulatorCache.py.
|
private |
Definition at line 68 of file AccumulatorCache.py.
|
staticprivate |
Definition at line 59 of file AccumulatorCache.py.
|
private |
Definition at line 69 of file AccumulatorCache.py.
|
static |
Definition at line 50 of file AccumulatorCache.py.
|
static |
Definition at line 49 of file AccumulatorCache.py.