CacheStorage Interface Reference

Inherited by LRUCacheStorageDelegate.

List of all members.

Public Member Functions

void clear ()
long count ()
long getMaximumSize ()
long getSize ()
Set< Stringkeys ()
void put (String keystring, MCElement el, int data_length)
void remove (String keystring)

Package Functions

MCElement get (String keystring)


Detailed Description

Interface for a cache usable by the daemon.

Read and write operations need not be thread safe as the caller (ServerSessionHandler) establishes its own locks.


Member Function Documentation

void clear (  ) 

Flush all entries from the cache

Implemented in LRUCacheStorageDelegate.

long count (  ) 

Returns:
how many entries are in the cache

Implemented in LRUCacheStorageDelegate.

MCElement get ( String  keystring  )  [package]

Retrieve an element from the cache. The retriever is responsible for counting hits, managing expirations, etc.

Parameters:
keystring the key identifying the entry
Returns:
a cache element

Implemented in LRUCacheStorageDelegate.

long getMaximumSize (  ) 

Returns:
the maximum capacity (in bytes) of the cache

Implemented in LRUCacheStorageDelegate.

long getSize (  ) 

Returns:
the total count (in bytes) of all the elements in the cache

Implemented in LRUCacheStorageDelegate.

Set<String> keys (  ) 

Returns:
the list of keys currently managed in the cache

Implemented in LRUCacheStorageDelegate.

void put ( String  keystring,
MCElement  el,
int  data_length 
)

Put an entry into the cache or replace an existing entry.

Parameters:
keystring the key identifying the entry
el the element to place in the cache
data_length 

Implemented in LRUCacheStorageDelegate.

void remove ( String  keystring  ) 

Remove an entry from the cache

Parameters:
keystring the key to lookup

Implemented in LRUCacheStorageDelegate.


The documentation for this interface was generated from the following file:

Generated on Sat May 26 06:42:31 2012 for Project Wonder by  doxygen 1.5.8