|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.rmi.server.RemoteObject
java.rmi.server.RemoteServer
wt.util.RMIServer
wt.cache.CacheManager
wt.vc.views.ViewCache
A cache of all View and ViewAssociation objects.
Field Summary | |
private Hashtable |
children
|
private static String |
CHILDREN_CACHE_KEY
|
private boolean |
initialized
|
private Hashtable |
parents
|
private static String |
PARENTS_CACHE_KEY
|
private static boolean |
VERBOSE
|
private View[] |
views
|
private static String |
VIEWS_BY_NAME_CACHE_KEY
|
private static String |
VIEWS_BY_OID_CACHE_KEY
|
private static String |
VIEWS_CACHE_KEY
|
private static String |
VIEWS_TRANSACTION_CACHE
|
private Hashtable |
viewsByName
|
private Hashtable |
viewsByOid
|
Fields inherited from class wt.cache.CacheManager |
MASTER |
Fields inherited from class wt.util.RMIServer |
csf, ssf |
Fields inherited from class java.rmi.server.RemoteServer |
|
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Fields inherited from interface wt.cache.CacheServer |
versionID |
Constructor Summary | |
ViewCache()
Construct an empty view cache. |
Method Summary | |
protected void |
addParentChildToContextCache(View parent,
View child)
|
private Object[] |
addToArray(Object[] array,
Object element)
|
protected void |
addViewChangeToContextCache(View view)
|
private void |
clear()
|
protected void |
clearContextCache()
|
View[] |
getAllViews()
Get all views. |
ObjectIdentifier[] |
getChildren(ObjectIdentifier parent_key)
Get children of a view. |
private Hashtable |
getContextCache()
|
int |
getDefaultSize()
Get desired size of the managed cache. |
ObjectIdentifier |
getParent(ObjectIdentifier child_key)
Get parent of a view. |
View |
getView(Object key)
Get the View object corresponding to a object identifier or name. |
private void |
init()
|
private void |
initializeContextCache()
|
private boolean |
isContextCacheInitialized()
|
void |
put(Object key,
Object value)
Signal a new or updated View or ViewAssociation object. |
void |
remove(Object key)
Signal a removed View or ViewAssociation object. |
protected void |
removeEntry(Object key)
Protected method called to remove an entry of the managed cache. |
private Object[] |
removeFromArray(Object[] array,
Object element)
|
protected void |
removeParentChildInContextCache(View parent,
View child)
|
void |
reset()
Method called when connection to master cache is broken and recovered indicating that a notification from another view cache might have been missed. |
Methods inherited from class wt.cache.CacheManager |
checkAccess, get, 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 |
Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final String VIEWS_TRANSACTION_CACHE
private static final String VIEWS_CACHE_KEY
private View[] views
private static final String VIEWS_BY_OID_CACHE_KEY
private Hashtable viewsByOid
private static final String VIEWS_BY_NAME_CACHE_KEY
private Hashtable viewsByName
private static final String PARENTS_CACHE_KEY
private Hashtable parents
private static final String CHILDREN_CACHE_KEY
private Hashtable children
private boolean initialized
private static final boolean VERBOSE
Constructor Detail |
public ViewCache() throws RemoteException
Method Detail |
public int getDefaultSize()
getDefaultSize
in class CacheManager
private void init() throws WTException
WTException
private void clear()
public void put(Object key, Object value)
put
in class CacheManager
key
- an ObjectIdentifiervalue
- the new or changed objectprotected void removeEntry(Object key)
removeEntry
in class CacheManager
key
- an ObjectIdentifierpublic void reset()
reset
in class CacheManager
public void remove(Object key)
remove
in class CacheManager
key
- an ObjectIdentifierpublic View getView(Object key) throws WTException
key
- an ObjectIdentifier or View name
WTException
public ObjectIdentifier getParent(ObjectIdentifier child_key) throws WTException
child_key
- ObjectIdentifier of the child view
WTException
public ObjectIdentifier[] getChildren(ObjectIdentifier parent_key) throws WTException
parent_key
- ObjectIdentifier of the parent view
WTException
public View[] getAllViews() throws WTException
WTException
private boolean isContextCacheInitialized()
private void initializeContextCache() throws WTException
WTException
private Hashtable getContextCache() throws WTException
WTException
protected void clearContextCache()
private Object[] addToArray(Object[] array, Object element)
private Object[] removeFromArray(Object[] array, Object element)
protected void addViewChangeToContextCache(View view) throws WTException
WTException
protected void addParentChildToContextCache(View parent, View child) throws WTException
WTException
protected void removeParentChildInContextCache(View parent, View child) throws WTException
WTException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |