Cache Class Reference
List of all members.
Member Enumeration Documentation
- Enumerator:
-
| STORED |
|
| NOT_STORED |
|
| EXISTS |
|
| NOT_FOUND |
|
Constructor & Destructor Documentation
Construct the server session handler
- Parameters:
-
| cacheStorage | the cache to use |
Member Function Documentation
Add an element to the cache
- Parameters:
-
- Returns:
- the store response code
Append bytes to the end of an element in the cache
- Parameters:
-
| element | the element to append |
- Returns:
- the store response code
Set an element in the cache but only if the element has not been touched since the last 'gets'
- Parameters:
-
| cas_key | the cas key returned by the last gets |
| e | the element to set |
- Returns:
- the store response code
Handle the deletion of an item from the cache.
- Parameters:
-
| key | the key for the item |
| time | an amount of time to block this entry in the cache for further writes |
- Returns:
- the message response
| void finishCacheRead |
( |
|
) |
[private] |
Blocks of code in which the contents of the cache are examined in any way must be surrounded by calls to startRead and finishRead. See documentation for ReadWriteLock.
| void finishCacheWrite |
( |
|
) |
[private] |
Blocks of code in which the contents of the cache are changed in any way must be surrounded by calls to startWrite and finishWrite. See documentation for ReadWriteLock.
| boolean flush_all |
( |
int |
expire |
) |
|
Flush all cache entries with a timestamp after a given expiration time
- Parameters:
-
| expire | the flush time in seconds |
- Returns:
- command response
Flush all cache entries
- Returns:
- command response
Get an element from the cache
- Parameters:
-
| key | the key for the element to lookup |
- Returns:
- the element, or 'null' in case of cache miss.
| Integer get_add |
( |
String |
key, |
|
|
int |
mod | |
|
) |
| | |
Increment an (integer) element inthe cache
- Parameters:
-
| key | the key to increment |
| mod | the amount to add to the value |
- Returns:
- the message response
| long getLimitMaxBytes |
( |
|
) |
|
| void initStats |
( |
|
) |
[protected] |
Initialize all statistic counters
| boolean isBlocked |
( |
MCElement |
e |
) |
[protected] |
| boolean isExpired |
( |
MCElement |
e |
) |
[protected] |
| boolean isThere |
( |
String |
key |
) |
[protected] |
Check whether an element is in the cache and non-expired and the slot is non-blocked
- Parameters:
-
| key | the key for the element to lookup |
- Returns:
- whether the element is in the cache and is live
| final int Now |
( |
|
) |
[protected] |
- Returns:
- the current time in seconds (from epoch), used for expiries, etc.
Prepend bytes to the end of an element in the cache
- Parameters:
-
| element | the element to append |
- Returns:
- the store response code
| void processDeleteQueue |
( |
|
) |
|
Executed periodically to clean from the cache those entries that are just blocking the insertion of new ones.
Replace an element in the cache
- Parameters:
-
- Returns:
- the store response code
Set an element in the cache
- Parameters:
-
- Returns:
- the store response code
| void startCacheRead |
( |
|
) |
[private] |
Blocks of code in which the contents of the cache are examined in any way must be surrounded by calls to startRead and finishRead. See documentation for ReadWriteLock.
| void startCacheWrite |
( |
|
) |
[private] |
Blocks of code in which the contents of the cache are changed in any way must be surrounded by calls to startWrite and finishWrite. See documentation for ReadWriteLock. protect the higher layers from implementation details.
Member Data Documentation
Read-write lock allows maximal concurrency, since readers can share access; only writers need sole access.
The documentation for this class was generated from the following file:
- /opt/source/Wonder/Frameworks/EOF/ERCaching/Sources/com/thimbleware/jmemcached/Cache.java