public interface IDatapool
Modifier and Type | Method and Description |
---|---|
void |
addListener(java.lang.String aPath,
java.lang.String aKey,
ITargetAddress aObserver)
Add a listener for a data pool slot.
|
void |
addOrUpdateRecord(IDatapoolRecord aRecord,
boolean aForce)
Add a new record to the pool.
|
void |
disableNotifications()
Disable all listener notifications.
|
void |
dumpValues(org.slf4j.Logger aLogger)
Dump all datapool values to a logger.
|
void |
enableNotifications(INamespace aNamespace)
Enable all listener notifications.
|
int |
getCount()
Get the number of records over all namespaces.
|
int |
getCount(java.lang.String aPath)
Get the number of records for a single namespace.
|
java.util.Collection<java.lang.String> |
getDump()
Dump the content of the datapool to a String list.
|
java.util.Collection<java.lang.String> |
getKeys(java.lang.String aPath) |
java.lang.String |
getName() |
char |
getPathDelimiter() |
java.util.Collection<IDatapoolRecord> |
getRecords(java.lang.String aPath) |
java.util.Collection<java.lang.String> |
getSubDirectories(java.lang.String aPath)
Get all sub directories to a path.
|
java.util.Collection<IDatapoolRecord> |
getSubRecords(java.lang.String aPath) |
java.lang.String |
getValue(java.lang.String aPath,
java.lang.String aKey)
Get a value from the data pool.
|
java.lang.String |
getValue(java.lang.String aPath,
java.lang.String aKey,
java.lang.String aDefaultValue)
Get a value from the data pool.
|
CResult |
importConfigFile(java.lang.String aPath)
Import a configuration file in XML format.
|
void |
importXml(java.io.File aFile) |
boolean |
isNotificationEnabled() |
void |
remove(java.lang.String aPath) |
void |
remove(java.lang.String aPath,
java.lang.String aKey)
Remove a datapool slot.
|
void |
removeListener(java.lang.String aPath,
java.lang.String aKey,
ITargetAddress aObserver)
Add a listener for a data pool slot.
|
void |
setValue(java.lang.String aPath,
java.lang.String aKey,
java.lang.String aValue)
Add or update a value in the pool.
|
void addListener(java.lang.String aPath, java.lang.String aKey, ITargetAddress aObserver) throws CException
aPath
- A datapool path.aKey
- The key.aObserver
- The observer target address.CException
- if key is not valid (Type or ID).void addOrUpdateRecord(IDatapoolRecord aRecord, boolean aForce)
aRecord
- The datapool record.aForce
- True = data will be overwritten in database, if record exists.
False = data will NOT be overwritten, if record exists.void disableNotifications()
void dumpValues(org.slf4j.Logger aLogger)
aLogger
- The logger used to dump all datapool values.void enableNotifications(INamespace aNamespace) throws CException
aNamespace
- The namespace where the notification handler is registered in.CException
- on error registering the target.int getCount()
int getCount(java.lang.String aPath)
aPath
- The path to count the records for.java.util.Collection<java.lang.String> getDump()
java.util.Collection<java.lang.String> getKeys(java.lang.String aPath)
aPath
- The path for the keys.java.lang.String getName()
char getPathDelimiter()
java.util.Collection<IDatapoolRecord> getRecords(java.lang.String aPath)
aPath
- A data pool path.java.util.Collection<java.lang.String> getSubDirectories(java.lang.String aPath)
aPath
- The path.java.util.Collection<IDatapoolRecord> getSubRecords(java.lang.String aPath)
aPath
- A data pool path.java.lang.String getValue(java.lang.String aPath, java.lang.String aKey)
aPath
- A datapool path.aKey
- The slot key.java.lang.String getValue(java.lang.String aPath, java.lang.String aKey, java.lang.String aDefaultValue)
aPath
- A datapool path.aKey
- The slot key.aDefaultValue
- The default value.CResult importConfigFile(java.lang.String aPath)
aPath
- The path of the file.void importXml(java.io.File aFile) throws CException
aFile
- The XML file.CException
- on error.boolean isNotificationEnabled()
void remove(java.lang.String aPath)
aPath
- The path (and all sub entries) will be deleted.void remove(java.lang.String aPath, java.lang.String aKey)
aPath
- A datapool path.aKey
- The slot key.void removeListener(java.lang.String aPath, java.lang.String aKey, ITargetAddress aObserver) throws CException
aPath
- A datapool path.aKey
- The key.aObserver
- The observer target address.CException
- if key is invalid (type or ID).void setValue(java.lang.String aPath, java.lang.String aKey, java.lang.String aValue)
aPath
- The path of the record.aKey
- The key of the record.aValue
- The value of the record.