org.kuali.common.util.runonce
Class PropertiesFileStateManager

java.lang.Object
  extended by org.kuali.common.util.runonce.PropertiesFileStateManager
All Implemented Interfaces:
RunOnceStateManager

public class PropertiesFileStateManager
extends Object
implements RunOnceStateManager


Constructor Summary
PropertiesFileStateManager(File propertiesFile, String encoding, String persistentPropertyKey)
           
 
Method Summary
 String getPersistentPropertyKey()
           
protected  Properties getProperties()
           
 File getPropertiesFile()
           
protected  boolean getRunOnce()
           
 void initialize()
          Do whatever needs to be done in order for isRunOnce() to return the right value.
 boolean isRunOnce()
          Return true if it is safe to run something once, false otherwise.
 void persistState(RunOnceState state)
          Update state in a way that persists across JVM restarts (eg database table, properties file, etc)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesFileStateManager

public PropertiesFileStateManager(File propertiesFile,
                                  String encoding,
                                  String persistentPropertyKey)
Method Detail

initialize

public void initialize()
Description copied from interface: RunOnceStateManager
Do whatever needs to be done in order for isRunOnce() to return the right value.

Specified by:
initialize in interface RunOnceStateManager

isRunOnce

public boolean isRunOnce()
Description copied from interface: RunOnceStateManager
Return true if it is safe to run something once, false otherwise.

Specified by:
isRunOnce in interface RunOnceStateManager

persistState

public void persistState(RunOnceState state)
Description copied from interface: RunOnceStateManager
Update state in a way that persists across JVM restarts (eg database table, properties file, etc)

Specified by:
persistState in interface RunOnceStateManager

getPersistentPropertyKey

public String getPersistentPropertyKey()

getPropertiesFile

public File getPropertiesFile()

getProperties

protected Properties getProperties()

getRunOnce

protected boolean getRunOnce()


Copyright © 2010-2013 The Kuali Foundation. All Rights Reserved.