net.israfil.foundation.caching
Class GenericCache

java.lang.Object
  extended by net.israfil.foundation.caching.GenericCache
All Implemented Interfaces:
Cache

public class GenericCache
extends java.lang.Object
implements Cache

A non-thread-safe cache object

Author:
Christian Edward Gruber

Constructor Summary
GenericCache()
           
 
Method Summary
 java.lang.Object get(Fetcher fetcher, java.lang.String cacheName, java.lang.String itemKey)
          Retrieves an object from a named cache.
 java.lang.Object get(Fetcher fetcher, java.lang.String cacheName, java.lang.String itemKey, java.lang.String subCache)
           
 java.lang.Object get(Fetcher fetcher, java.lang.String cacheName, java.lang.String itemKey, java.lang.String[] path)
          Retrieves an object from a path in the cache
 void set(java.lang.String cacheName, java.lang.String itemKey, java.lang.Object value)
           
 void set(java.lang.String cacheName, java.lang.String itemKey, java.lang.Object value, java.lang.String subCache)
           
 void set(java.lang.String cacheName, java.lang.String itemKey, java.lang.Object value, java.lang.String[] path)
          A method to set values within the cache, to be used by Fetcher implementations in setting up the cache when they fetch.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericCache

public GenericCache()
Method Detail

get

public java.lang.Object get(Fetcher fetcher,
                            java.lang.String cacheName,
                            java.lang.String itemKey)
Retrieves an object from a named cache.

Specified by:
get in interface Cache
Parameters:
cacheName - A string identifying from which cache the object will be retrieved
An - array of path items identifying the path through the map keys.

get

public java.lang.Object get(Fetcher fetcher,
                            java.lang.String cacheName,
                            java.lang.String itemKey,
                            java.lang.String subCache)
Specified by:
get in interface Cache

get

public java.lang.Object get(Fetcher fetcher,
                            java.lang.String cacheName,
                            java.lang.String itemKey,
                            java.lang.String[] path)
Retrieves an object from a path in the cache

Specified by:
get in interface Cache
Parameters:
cacheName - A string identifying from which cache the object will be retrieved
An - array of path items identifying the path through the map keys.

set

public void set(java.lang.String cacheName,
                java.lang.String itemKey,
                java.lang.Object value)
Specified by:
set in interface Cache

set

public void set(java.lang.String cacheName,
                java.lang.String itemKey,
                java.lang.Object value,
                java.lang.String subCache)
Specified by:
set in interface Cache

set

public void set(java.lang.String cacheName,
                java.lang.String itemKey,
                java.lang.Object value,
                java.lang.String[] path)
A method to set values within the cache, to be used by Fetcher implementations in setting up the cache when they fetch.

Specified by:
set in interface Cache


Copyright © 2003-2006. All Rights Reserved.