wt.prefs
Class PrefEntryCache
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
wt.util.RMIServer
wt.cache.CacheManager
wt.prefs.PrefEntryCache
- All Implemented Interfaces:
- CacheServer, Remote, Serializable, Unreferenced
- public class PrefEntryCache
- extends CacheManager
- See Also:
- Serialized Form
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 |
versionID
private static final String versionID
- See Also:
- Constant Field Values
VERBOSE
private static final boolean VERBOSE
CLASSNAME
private static final String CLASSNAME
prefEntryCacheSize
private static int prefEntryCacheSize
lock
private static Object lock
c
private Cache c
PrefEntryCache
public PrefEntryCache()
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
public void putLocalEntry(Object key,
Object value)
- Put in the local Cache
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
public void printCache()