wt.iba.definition.service
Class IBADefinitionCache
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
wt.util.RMIServer
wt.cache.CacheManager
wt.iba.definition.service.IBADefinitionCache
- All Implemented Interfaces:
- CacheServer, Remote, Serializable, Unreferenced
- public class IBADefinitionCache
- extends CacheManager
This class implements a IBADefinition cache service. It follows the 2-level cache paradigm.
Creation and updates to IBADefinitions must be communicated to the cache by the
Services manager.
- See Also:
- Serialized Form
Constructor Summary |
IBADefinitionCache()
Do not directly invoke this constructor! Use getIBADefinitionCache instead. |
Methods inherited from class wt.cache.CacheManager |
checkAccess, get, getDefaultName, getEntry, isCacheHost, overflow, ping, put, 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
dataLock
private static Object dataLock
flushLock
private static Object flushLock
currentThreads
private static HashMap currentThreads
organizers
private static HashMap organizers
rootOrganizers
private static HashMap rootOrganizers
attributeDefs
private static HashMap attributeDefs
cache
private static IBADefinitionCache cache
VERBOSE
private static final boolean VERBOSE
CACHESIZE
private static int CACHESIZE
IBADefinitionCache
public IBADefinitionCache()
throws RemoteException
- Do not directly invoke this constructor! Use getIBADefinitionCache instead.
The constructor is public so that the ServerManager can create an instance of this
class for use as the master cache.
However, since the master cache is only being used to signal slave caches, we don't
want to construct any of the internal cache objects.
getIBADefinitionCache
public static IBADefinitionCache getIBADefinitionCache()
- Contruct a new IBADefinition cache.
removeEntry
protected void removeEntry(Object target)
- Simply clear local cache when signalled. Will be repopulated on subsequent requests
- Overrides:
removeEntry
in class CacheManager
- Parameters:
target
- the key object (null = clear entire cache)
putEntry
public void putEntry(Object key,
Object value)
- Overrides CacheManager.putEntry to do nothing so that no entries are
added to the wt.util.Cache object contained in CacheManager.
- Overrides:
putEntry
in class CacheManager
- Parameters:
key
- the key objectvalue
- the value object
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
clear
protected void clear()
reset
public void reset()
- Method called when connection to master cache is broken and recovered
indicating that a notification from another IBADefinition cache might have been missed.
The current cache is cleared and reinitialized later.
- Overrides:
reset
in class CacheManager
Print
public void Print()
getAttributeOrganizerRoots
public AttributeOrganizer[] getAttributeOrganizerRoots()
throws WTException
- Return all root Attribute Organizers
- Throws:
WTException
getAttributeChildren
public AttributeHierarchyChild[] getAttributeChildren(AbstractAttributeDefinizerNodeView node)
throws WTException
- Throws:
WTException
getAttributeChildren
public AttributeHierarchyChild[] getAttributeChildren(AbstractAttributeDefinizerDefaultView node)
throws WTException
- Throws:
WTException
getAttributeChildren
public AttributeHierarchyChild[] getAttributeChildren(ObjectIdentifier nodeOi,
boolean isNodeOrganizer)
throws WTException
- Throws:
WTException
getAttributeOrganizer
public AttributeOrganizer getAttributeOrganizer(ObjectIdentifier oi)
throws WTException
- Throws:
WTException
getAttributeDefinition
public AttributeDefinition getAttributeDefinition(ObjectIdentifier oi)
throws WTException
- Throws:
WTException
aquireLock
private Object aquireLock()
releaseLock
private void releaseLock(Object localLock)
blockOnLock
private void blockOnLock()