Interface PersistentSet
- All Known Subinterfaces:
TransactionController
,TransactionManager
,XATransactionController
- All Known Implementing Classes:
RAMTransaction
-
Method Summary
Modifier and TypeMethodDescriptionGet properties that can be stored in a java.util.Properties object.getProperty
(String key) Gets a value for a stored property.getPropertyDefault
(String key) Gets a default value for a stored property.boolean
Return true if the default property is visible.void
setProperty
(String key, Serializable value, boolean dbOnlyProperty) Sets the Serializable object associated with a property key.void
setPropertyDefault
(String key, Serializable value) Sets the Serializable object default value associated with a property key.
-
Method Details
-
getProperty
Gets a value for a stored property. The returned value will be:- the de-serialized object associated with the key using setProperty if such a value is defined or
- the default de-serialized object associated with the key using setPropertyDefault if such a value is defined or
- null
The Store provides a transaction protected list of database properties. Higher levels of the system can store and retrieve these properties once Recovery has finished. Each property is a serializable object and is stored/retrieved using a String key.
- Parameters:
key
- The "key" of the property that is being requested.- Returns:
- object The requested object or null.
- Throws:
StandardException
- Standard exception policy.
-
getPropertyDefault
Gets a default value for a stored property. The returned value will be:- the default de-serialized object associated with the key using setPropertyDefault if such a value is defined or
- null
The Store provides a transaction protected list of database properties. Higher levels of the system can store and retrieve these properties once Recovery has finished. Each property is a serializable object and is stored/retrieved using a String key.
- Parameters:
key
- The "key" of the property that is being requested.- Returns:
- object The requested object or null.
- Throws:
StandardException
- Standard exception policy.
-
propertyDefaultIsVisible
Return true if the default property is visible. A default is visible as long as the property is not set.- Parameters:
key
- The "key" of the property that is being requested.- Throws:
StandardException
- Standard exception policy.
-
setProperty
Sets the Serializable object associated with a property key.See the discussion of getProperty().
The value stored may be a Formatable object or a Serializable object whose class name starts with java.*. This stops arbitary objects being stored in the database by class name, which will cause problems in obfuscated/non-obfuscated systems.
- Parameters:
key
- The key used to lookup this property.value
- The value to be associated with this key. If null, delete the property from the properties list.dbOnlyProperty
- True if property is only ever searched for int the database properties.- Throws:
StandardException
- Standard exception policy.
-
setPropertyDefault
Sets the Serializable object default value associated with a property key.See the discussion of getProperty().
The value stored may be a Formatable object or a Serializable object whose class name starts with java.*. This stops arbitary objects being stored in the database by class name, which will cause problems in obfuscated/non-obfuscated systems.
- Parameters:
key
- The key used to lookup this propertyDefault.value
- The default value to be associated with this key. If null, delete the property default from the properties list.- Throws:
StandardException
- Standard exception policy.
-
getProperties
Get properties that can be stored in a java.util.Properties object.Get the sub-set of stored properties that can be stored in a java.util.Properties object. That is all the properties that have a value of type java.lang.String. Changes to this properties object are not reflected in any persisent storage.
Code must use the setProperty() method call.
- Returns:
- The sub-set of stored properties that can be stored in a java.util.Propertes object.
- Throws:
StandardException
- Standard exception policy.
-