de.fzj.unicore.wsrflite.persistence
Class Persistence

java.lang.Object
  extended by de.fzj.unicore.wsrflite.persistence.AbstractStore
      extended by de.fzj.unicore.wsrflite.persistence.Persistence
All Implemented Interfaces:
IPersistenceProperties, Store

public class Persistence
extends AbstractStore

use the Persistence framework for storing wsrf instances

Author:
schuller

Nested Class Summary
static class Persistence.PropertySource
          get persistence config from the Kernel properties (i.e. wsrflite.xml)
 
Field Summary
 
Fields inherited from class de.fzj.unicore.wsrflite.persistence.AbstractStore
instances, serviceName, settings, uniqueIDs
 
Fields inherited from interface de.fzj.unicore.wsrflite.persistence.IPersistenceProperties
WSRF_PERSIST_CLASSNAME, WSRF_PERSIST_STORAGE_DIRECTORY
 
Constructor Summary
Persistence()
           
 
Method Summary
protected  WSRFInstanceBean _getForUpdate(String uniqueID, long time, TimeUnit timeUnit)
           
protected  void _getUniqueIDs()
           
protected  void _persist(WSRFInstanceBean data)
           
protected  WSRFInstanceBean _read(String uniqueID)
           
protected  void _remove(String uniqueID)
           
protected  void _unlock(WSRFInstanceBean dao)
           
 long getCacheHits()
           
 Map<String,Calendar> getTerminationTimes()
          gets current termination times for all ws-resources in this store
 void init(String serviceName)
          initialise the store
 void purgePersistentData()
          Fully deletes persistent data, for example after service undeployment
 void removeAll()
           
 void setTerminationTime(String uniqueID, Calendar c)
          sets termination time for a ws-resource
 void shutdown()
          shutdown the store
 
Methods inherited from class de.fzj.unicore.wsrflite.persistence.AbstractStore
getForUpdate, getPersistenceSettings, getServiceName, getUniqueIDs, persist, read, remove, setPersistenceSettings, size, unlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Persistence

public Persistence()
Method Detail

init

public void init(String serviceName)
Description copied from interface: Store
initialise the store

Specified by:
init in interface Store
Overrides:
init in class AbstractStore
Parameters:
serviceName - The name of the service that is persisted

_getUniqueIDs

protected void _getUniqueIDs()
Specified by:
_getUniqueIDs in class AbstractStore

_persist

protected void _persist(WSRFInstanceBean data)
                 throws Exception
Specified by:
_persist in class AbstractStore
Throws:
Exception

_read

protected WSRFInstanceBean _read(String uniqueID)
                          throws Exception
Specified by:
_read in class AbstractStore
Throws:
Exception

_getForUpdate

protected WSRFInstanceBean _getForUpdate(String uniqueID,
                                         long time,
                                         TimeUnit timeUnit)
                                  throws Exception
Specified by:
_getForUpdate in class AbstractStore
Throws:
Exception

_remove

protected void _remove(String uniqueID)
Specified by:
_remove in class AbstractStore

purgePersistentData

public void purgePersistentData()
Description copied from interface: Store
Fully deletes persistent data, for example after service undeployment


_unlock

protected void _unlock(WSRFInstanceBean dao)
                throws de.fzj.unicore.persist.PersistenceException
Specified by:
_unlock in class AbstractStore
Throws:
de.fzj.unicore.persist.PersistenceException

removeAll

public void removeAll()
               throws de.fzj.unicore.persist.PersistenceException
Throws:
de.fzj.unicore.persist.PersistenceException

shutdown

public void shutdown()
Description copied from interface: Store
shutdown the store


getTerminationTimes

public Map<String,Calendar> getTerminationTimes()
Description copied from interface: Store
gets current termination times for all ws-resources in this store

Returns:
Map terminationTimes

setTerminationTime

public void setTerminationTime(String uniqueID,
                               Calendar c)
                        throws UnableToSetTerminationTimeException
Description copied from interface: Store
sets termination time for a ws-resource

Throws:
UnableToSetTerminationTimeException

getCacheHits

public long getCacheHits()
Overrides:
getCacheHits in class AbstractStore


Copyright © 2010. All Rights Reserved.