wt.recent
Class RecentUpdateCache
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
wt.util.RMIServer
wt.cache.CacheManager
wt.recent.RecentUpdateCache
- All Implemented Interfaces:
- CacheServer, Remote, Serializable, Unreferenced
- public class RecentUpdateCache
- extends CacheManager
- See Also:
- Serialized Form
Method Summary |
Object |
get(Object key)
Get from Local cache else returns null forcing a DB Query |
private Cache |
getCache()
|
int |
getDefaultSize()
Overriden CacheManager method to set cache size |
protected void |
printCache()
|
void |
put(Object key,
Object value)
Put in the local Cache and remove from all other caches |
protected void |
putLocalEntry(Object key,
Object value)
Put in the local Cache
The params:
key : String ||
value : RecentUpdate object |
void |
remove(Object key)
Remove from all caches |
protected void |
removeEntry(Object key)
overridden removeEntry method of CacheManager, remove element from local
cache |
void |
reset()
overridden reset method of CacheManager, clear local cache |
Methods inherited from class wt.cache.CacheManager |
checkAccess, getDefaultName, getEntry, isCacheHost, overflow, ping, putEntry, putEntry, reference, registerSlave, remove, removeEntry, unreferenced, update, updateEntry, updateEntry |
Methods inherited from class wt.util.RMIServer |
clone, exportObject, exportObject, exportObject, getClientSocketFactory, getPort, getServerSocketFactory, getStub, isHostInList, isLocalHost, setPort, writeReplace |
VERBOSE
private static final boolean VERBOSE
CLASSNAME
private static final String CLASSNAME
recentUpdateCacheSize
private static int recentUpdateCacheSize
fwd
private static RecentlyVisitedServiceFwd fwd
c
private Cache c
RecentUpdateCache
public RecentUpdateCache()
throws RemoteException
- Contruct a new cache.
getCache
private Cache getCache()
getDefaultSize
public int getDefaultSize()
- Overriden CacheManager method to set cache size
- Overrides:
getDefaultSize
in class CacheManager
- Returns:
- default cache size
removeEntry
protected void removeEntry(Object key)
- overridden removeEntry method of CacheManager, remove element from local
cache
- Overrides:
removeEntry
in class CacheManager
- Parameters:
key
- - hash key of element to be removed
putLocalEntry
protected void putLocalEntry(Object key,
Object value)
- Put in the local Cache
The params:
key : String ||
value : RecentUpdate object
put
public void put(Object key,
Object value)
- Put in the local Cache and remove from all other caches
- Overrides:
put
in class CacheManager
- Parameters:
key
- the key objectvalue
- the value object
reset
public void reset()
throws RemoteException
- overridden reset method of CacheManager, clear local cache
- Overrides:
reset
in class CacheManager
- Throws:
RemoteException
remove
public void remove(Object key)
- Remove from all caches
- Overrides:
remove
in class CacheManager
- Parameters:
key
- the key object (null = clear entire cache)
get
public Object get(Object key)
- Get from Local cache else returns null forcing a DB Query
- Overrides:
get
in class CacheManager
- Parameters:
key
- the key object
- Returns:
- the corresponding cached object or null if not in cache
printCache
protected void printCache()