org.pasoa.storage
Class GeneralStorageSystem

java.lang.Object
  extended by org.pasoa.storage.GeneralStorageSystem
All Implemented Interfaces:
Cache, Management, Query, Record, StorageSystem

public class GeneralStorageSystem
extends Object
implements StorageSystem


Field Summary
 
Fields inherited from interface org.pasoa.common.Record
ACTOR_STATE_PA, INTERACTION_PA, RELATIONSHIP_PA, SUBMISSION_FINISHED
 
Constructor Summary
GeneralStorageSystem(BackendStore store, String resolverClass)
           
 
Method Summary
 void cache(CacheableItem ci)
           
 boolean cacheEnabled()
           
 void delete()
           
 CacheableItem getCachedItem()
          Returns some item that has been cached.
 Retrieval getRetrievalInterface()
           
 void record(GlobalPAssertionKey gpid, Element asserter, Element assertion, String kindOfAssertion)
           
 Document resolve(String query)
           
 void shutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeneralStorageSystem

public GeneralStorageSystem(BackendStore store,
                            String resolverClass)
Method Detail

record

public void record(GlobalPAssertionKey gpid,
                   Element asserter,
                   Element assertion,
                   String kindOfAssertion)
            throws Exception
Specified by:
record in interface Record
Throws:
Exception

resolve

public Document resolve(String query)
                 throws Exception
Specified by:
resolve in interface Query
Throws:
Exception

cacheEnabled

public boolean cacheEnabled()
Specified by:
cacheEnabled in interface Cache

cache

public void cache(CacheableItem ci)
           throws Exception
Specified by:
cache in interface Cache
Throws:
Exception

getCachedItem

public CacheableItem getCachedItem()
                            throws Exception
Description copied from interface: Cache
Returns some item that has been cached. No order is guranteed. Returns null if there are no CachableItems left in the cache. !!! When a cached item is gotten from the cache, it is removed from the cache and not longer exists there.

Specified by:
getCachedItem in interface Cache
Returns:
Throws:
Exception

getRetrievalInterface

public Retrieval getRetrievalInterface()
Specified by:
getRetrievalInterface in interface StorageSystem

shutdown

public void shutdown()
              throws Exception
Specified by:
shutdown in interface Management
Throws:
Exception

delete

public void delete()
            throws Exception
Specified by:
delete in interface Management
Throws:
Exception