net.spy.factory
Interface CacheEntry<T extends Instance>

All Known Implementing Classes:
HashCacheEntry

public interface CacheEntry<T extends Instance>

Interface for factory cache implementations.


Method Summary
 void cacheInstance(T i)
          Cache the given instance.
 java.util.Collection<T> getAllObjects()
          Get all objects in this cache.
 T getById(int id)
          Get an object by id.
 

Method Detail

cacheInstance

void cacheInstance(T i)
Cache the given instance.


getById

T getById(int id)
Get an object by id.

Parameters:
id - the object ID
Returns:
the object, or null if there's no object by this ID

getAllObjects

java.util.Collection<T> getAllObjects()
Get all objects in this cache.



Copyright © 1995-2006 SPY Internetworking. All Rights Reserved.