com.waveset.adapter
Class XMLResourceAdapter.ResourceCache

java.lang.Object
  extended bycom.waveset.adapter.XMLResourceAdapter.ResourceCache
Direct Known Subclasses:
SimulatedResourceAdapter.ExtendedResourceCache
Enclosing class:
XMLResourceAdapter

public static class XMLResourceAdapter.ResourceCache
extends java.lang.Object

Inner class holding a cache of accounts for a particular resource.


Constructor Summary
protected XMLResourceAdapter.ResourceCache()
           
  XMLResourceAdapter.ResourceCache(java.lang.String resource, java.lang.String path)
           
 
Method Summary
 java.lang.String cacheToXml()
           
 void flush()
           
 GenericObject get(java.lang.String name)
           
protected  java.lang.String getAccountMapKey(GenericObject geo)
           
 java.util.List getSortedNames()
           
protected  void initializeCache(java.lang.String resource, java.lang.String path)
           
protected  void loadCache()
           
 void put(GenericObject obj)
           
protected  void reloadIfStale()
           
 void remove(java.lang.String name)
           
 void removeAll()
          Removes all users from the cache and flushes it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLResourceAdapter.ResourceCache

protected XMLResourceAdapter.ResourceCache()

XMLResourceAdapter.ResourceCache

public XMLResourceAdapter.ResourceCache(java.lang.String resource,
                                        java.lang.String path)
                                 throws WavesetException
Method Detail

initializeCache

protected void initializeCache(java.lang.String resource,
                               java.lang.String path)
                        throws WavesetException
Throws:
WavesetException

get

public GenericObject get(java.lang.String name)
                  throws WavesetException
Throws:
WavesetException

put

public void put(GenericObject obj)

remove

public void remove(java.lang.String name)

removeAll

public void removeAll()
               throws WavesetException
Removes all users from the cache and flushes it.

Throws:
WavesetException

flush

public void flush()
           throws WavesetException
Throws:
WavesetException

cacheToXml

public java.lang.String cacheToXml()

getSortedNames

public java.util.List getSortedNames()

loadCache

protected void loadCache()
                  throws WavesetException
Throws:
WavesetException

reloadIfStale

protected void reloadIfStale()
                      throws WavesetException
Throws:
WavesetException

getAccountMapKey

protected java.lang.String getAccountMapKey(GenericObject geo)