Package org.scictrl.csshell.epics.server
Class PersistencyStore
java.lang.Object
org.scictrl.csshell.epics.server.PersistencyStore
- All Implemented Interfaces:
Runnable
Stores and restores state of Record or PersistentValueProcessor, which are registered.
- Author:
- igor@scictrl.com
-
Constructor Summary
ConstructorDescriptionMake instance of store, that operates as a dummy.PersistencyStore
(File f, Database database) Constructor for PersistencyStore. -
Method Summary
Modifier and TypeMethodDescriptionboolean
deregister.boolean
deregister
(Record rec) deregister.void
flush()
flush.void
Registers provided processor with store/restore service.void
registerValue
(Record rec) Registers provided record to have value stored.void
run()
void
saveAll()
saveAll.
-
Constructor Details
-
PersistencyStore
public PersistencyStore() throws org.apache.commons.configuration.ConfigurationExceptionMake instance of store, that operates as a dummy.- Throws:
org.apache.commons.configuration.ConfigurationException
- configuration error
-
PersistencyStore
public PersistencyStore(File f, Database database) throws org.apache.commons.configuration.ConfigurationException Constructor for PersistencyStore.
-
-
Method Details
-
flush
public void flush()flush.
-
run
public void run() -
registerProcessor
Registers provided processor with store/restore service. First restores any previously stored status to the processor, as defined byPersistentValueProcessor.restore(org.apache.commons.configuration.Configuration)
. Then processor is monitored for changes and any change triggers store functionality, as defined byPersistentValueProcessor.store(org.apache.commons.configuration.Configuration)
.- Parameters:
proc
- the processor to be stored
-
registerValue
Registers provided record to have value stored. Provided record is monitored for changes and any change triggers store functionality.- Parameters:
rec
- aRecord
object
-
deregister
deregister.
- Parameters:
rec
- aRecord
object- Returns:
- a boolean
-
deregister
deregister.
- Parameters:
proc
- aPersistentValueProcessor
object- Returns:
- a boolean
-
saveAll
public void saveAll()saveAll.
-