|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.spy.SpyObject
net.spy.factory.Storage<T>
public class Storage<T>
An implementation of CacheEntry that is backed by a HashMap. This implementation will find any public methods on the given objects containing a CacheKey annotation, or any fields with any visibility declared only within the classes of the given objects and use them as cache hints.
| Constructor Summary | |
|---|---|
Storage(Collection<T> obs)
Get an instance of HashCacheEntry. |
|
| Method Summary | |
|---|---|
void |
cacheInstance(T i)
Cache this instance. |
Collection<T> |
getAllObjects()
Get all of the objects in this cache. |
T |
getObject(String cacheName,
Object key)
Get a specific object by cache name and key. |
Collection<T> |
getObjects(String cacheName,
Object key)
Get the objects multicached to a particular key. |
| Methods inherited from class net.spy.SpyObject |
|---|
getLogger |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Storage(Collection<T> obs)
| Method Detail |
|---|
public void cacheInstance(T i)
throws Exception
Exceptionpublic Collection<T> getAllObjects()
public T getObject(String cacheName,
Object key)
cacheName - the name of the cache containing the objectkey - the key under which the object is cached
public Collection<T> getObjects(String cacheName,
Object key)
cacheName - the name of the cache containing the objectskey - the key under which the objects are cached
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||