Package fr.dyade.aaa.util
Class BaseTransaction
- java.lang.Object
-
- fr.dyade.aaa.util.BaseTransaction
-
- All Implemented Interfaces:
Transaction
- Direct Known Subclasses:
AbstractTransaction,JTransaction,NullTransaction
public abstract class BaseTransaction extends Object implements Transaction
-
-
Constructor Summary
Constructors Constructor Description BaseTransaction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringdumpObjectList(String prefix)JMX operation.voidfreeze(long timeout)booleangetBoolean(String key)Returnstrueif and only if the corresponding property exists and is equal to the string"true".IntegergetInteger(String key)Determines the integer value of the property with the specified name.IntegergetInteger(String key, int value)Determines the integer value of the property with the specified name.StringgetObject(String dirname, String name)Only use with MBean.String[]getObjectList(String prefix)JMX operation.StringgetProperty(String key)Searches for the property with the specified key in the specific Transaction property list.StringgetProperty(String key, String defaultValue)Searches for the property with the specified key in the specific Transaction property list.voidloadProperties(File dir)voidsaveProperties(File dir)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface fr.dyade.aaa.util.Transaction
backup, begin, close, commit, containsOperations, create, create, createByteArray, createByteArray, delete, delete, getCommitCount, getList, getOperationCount, getPhase, getPhaseInfo, init, isPersistent, load, load, loadAll, loadByteArray, loadByteArray, release, save, save, save, saveByteArray, saveByteArray, saveByteArray, stop, useLoadAll
-
-
-
-
Field Detail
-
logmon
protected static final Logger logmon
-
DEBUG
protected static final boolean DEBUG
-
props
private Properties props
-
-
Method Detail
-
freeze
public void freeze(long timeout) throws InterruptedException- Specified by:
freezein interfaceTransaction- Throws:
InterruptedException
-
loadProperties
public void loadProperties(File dir) throws InvalidPropertiesFormatException, FileNotFoundException, IOException
-
saveProperties
public void saveProperties(File dir) throws IOException
- Throws:
IOException
-
getProperty
public String getProperty(String key)
Searches for the property with the specified key in the specific Transaction property list. If the key is not found in this property list, the Configuration property list is then checked. The property list is then updated. The method returnsnullif the property is not found.- Specified by:
getPropertyin interfaceTransaction- Parameters:
key- the property key.- Returns:
- the value corresponding to the specified key value.
-
getProperty
public String getProperty(String key, String defaultValue)
Searches for the property with the specified key in the specific Transaction property list. If the key is not found in this property list, the Configuration property list is then checked. The method returns the default value argument if the property is not found.- Specified by:
getPropertyin interfaceTransaction- Parameters:
key- the property key.defaultValue- a default value.- Returns:
- the value corresponding to the specified key value.
-
getInteger
public Integer getInteger(String key)
Determines the integer value of the property with the specified name.- Specified by:
getIntegerin interfaceTransaction- Parameters:
key- property name.- Returns:
- the Integer value of the property.
-
getInteger
public Integer getInteger(String key, int value)
Determines the integer value of the property with the specified name.- Specified by:
getIntegerin interfaceTransaction- Parameters:
key- property name.value- a default value.- Returns:
- the Integer value of the property.
-
getBoolean
public boolean getBoolean(String key)
Returnstrueif and only if the corresponding property exists and is equal to the string"true".- Specified by:
getBooleanin interfaceTransaction- Parameters:
key- the property name.- Returns:
- the
booleanvalue of the property.
-
getObject
public String getObject(String dirname, String name)
Only use with MBean.- Specified by:
getObjectin interfaceTransaction
-
dumpObjectList
public String dumpObjectList(String prefix)
JMX operation. This operation sorts the resulting array and filters out the prefix identical for each object name.- Specified by:
dumpObjectListin interfaceTransaction- Parameters:
prefix-- Returns:
-
getObjectList
public String[] getObjectList(String prefix)
JMX operation.- Specified by:
getObjectListin interfaceTransaction- Parameters:
prefix-- Returns:
-
-