wt.calendar
Class WTCalendarCache
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
wt.util.RMIServer
wt.cache.CacheManager
wt.calendar.WTCalendarCache
- All Implemented Interfaces:
- CacheServer, Remote, Serializable, Unreferenced
- public class WTCalendarCache
- extends CacheManager
This class implements a calendar cache service. There are different values for each type of key:
CALENDAR expects a WTCalendar
CALENDAR_COMPONENTS expects a QueryResult
WORKING_DAYS expects an Integer
WORKING_PERIODS expects an Integer
- See Also:
- Serialized Form
Methods inherited from class wt.cache.CacheManager |
checkAccess, get, getDefaultName, getEntry, isCacheHost, 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 |
versionID
private static final String versionID
- See Also:
- Constant Field Values
lock
Object lock
size
int size
calendars
Cache calendars
wdCache
Cache wdCache
wpCache
Cache wpCache
cacheSummaryInterval
private static int cacheSummaryInterval
cacheHits
private static int cacheHits
VERBOSE
protected static boolean VERBOSE
STACKTRACE
protected static boolean STACKTRACE
WTCalendarCache
public WTCalendarCache()
throws RemoteException
- Contruct a new calendar cache.
overflow
protected void overflow(Object key,
Object value)
- overide super.overflow to caputure overflow occurences
and clean up supporting caches
- Overrides:
overflow
in class CacheManager
remove
protected void remove(long pid)
remove
protected void remove(StartEndKey key)
removeEntry
protected void removeEntry(Object target)
- Simply clear local cache when signalled.
It will be repopulated on subsequent requests
- Overrides:
removeEntry
in class CacheManager
- Parameters:
target
- the key object (null = clear entire cache)
reportCacheStats
private void reportCacheStats()
get
public Object get(StartEndKey key)
- Cover method for CacheManager get that tests for a set of keys
refering to the same object
put
public void put(StartEndKey key,
Object value)
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
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