wt.wait
Class WaitService.Cache
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
wt.util.RMIServer
wt.cache.CacheManager
wt.wait.WaitService.Cache
- All Implemented Interfaces:
- CacheServer, Remote, Runnable, Serializable, Unreferenced
- Enclosing class:
- WaitService
- public static class WaitService.Cache
- extends CacheManager
- implements Runnable
- See Also:
- Serialized Form
Methods inherited from class wt.cache.CacheManager |
checkAccess, get, getDefaultName, getEntry, isCacheHost, overflow, ping, put, putEntry, putEntry, reference, registerSlave, remove, 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 |
books
private static Hashtable books
notifications
private Vector notifications
notifier
private Thread notifier
WaitService.Cache
public WaitService.Cache()
throws RemoteException
getDefaultSize
public int getDefaultSize()
- Description copied from class:
CacheManager
- Get desired size of this cache.
This method attemps to find a size property called
wt.cache.size.CacheName
where cacheName
is the name of this cache. Subclasses can override this
method to control cache size in some other way. If no property is found, the default
size is 100.
Supported API: true
- Overrides:
getDefaultSize
in class CacheManager
localNotify
private static void localNotify(String key)
getLockObj
public String getLockObj(String lock)
removeEntry
protected void removeEntry(Object key)
- Description copied from class:
CacheManager
- Protected method which allows subclasses of CacheManager to
take some action when a entry is being removed from the local cache.
This method is invoked to remove the entry in the local cache as a result
of a local
remove
call or a call forwarded from a master cache.
If this cache has a master cache, the remove
call will already
be forwarded to the master before this method is invoked. Slave caches
will be notified to remove their entries after this method returns.
This method must not cause a recursive remove
call.
This method is not called when entries are being removed by the overflow
or reset
methods.
Supported API: true
- Overrides:
removeEntry
in class CacheManager
- Parameters:
key
- the key object (null = clear entire cache)
waitOn
public void waitOn(String key)
throws InterruptedException
- Throws:
InterruptedException
waitOn
public void waitOn(String key,
long timeout)
throws InterruptedException
- Throws:
InterruptedException
doNotification
private void doNotification(String key)
run
public void run()
- Specified by:
run
in interface Runnable
notifyOn
public void notifyOn(String key)
reset
public void reset()
throws RemoteException
- Description copied from class:
CacheManager
- Reset local cache after master reconnect.
Called after recovery from communication failure when a connection to a
new master has been established. The current cache contents are cleared
and the local cache is registered as a slave of the new master.
NOTE: This may be called as a result of calling other cache updating operations
since that is when the disconnect and reconnect may take place. When this
happens, this method is called before the other methods return.
Supported API: true
- Overrides:
reset
in class CacheManager
- Throws:
RemoteException