Represents session with the Key database.
More...
Inherits AutoCloseable.
|
| KDB (final Pointer p) |
| Helper constructor for duplication by pointer. More...
|
|
void | close () |
| Clean-up function initiating closing of the KDB session.
|
|
void | get (final KeySet ks, final Key parentKey) throws KDBException |
| Will fetch at least all keys that are sub-keys or children of sub-keys of the supplied parent key. More...
|
|
void | set (final KeySet ks, final Key parentKey) throws KDBException |
| Will update changed keys of the given keyset in the backend. More...
|
|
void | close (final Key parentKey) |
| Clean-up method that closes the KDB session. More...
|
|
|
static KDB | open (final Key parentKey) |
| Basic constructor of KDB class
Opens KDB session with the given parentKey to write possible warning and error information to. More...
|
|
|
Pointer | get () |
| Native pointer being used by JNA. More...
|
|
Represents session with the Key database.
Close after usage, or simply use a try-with-resources statement.
◆ KDB()
org.libelektra.KDB.KDB |
( |
final Pointer |
p | ) |
|
|
inline |
Helper constructor for duplication by pointer.
- Parameters
-
p | Pointer to another KDB object |
◆ close()
void org.libelektra.KDB.close |
( |
final Key |
parentKey | ) |
|
|
inline |
Clean-up method that closes the KDB session.
- Parameters
-
parentKey | Key holding error and warning information |
◆ get() [1/2]
void org.libelektra.KDB.get |
( |
final KeySet |
ks, |
|
|
final Key |
parentKey |
|
) |
| throws KDBException |
|
inline |
Will fetch at least all keys that are sub-keys or children of sub-keys of the supplied parent key.
- Parameters
-
ks | KeySet where the fetched keys will be stored in |
parentKey | Root key which name will be used to fetch keys below it |
- Exceptions
-
KDBException | In case of an error when loading keys |
◆ get() [2/2]
Pointer org.libelektra.KDB.get |
( |
| ) |
|
|
inlineprotected |
Native pointer being used by JNA.
- Returns
- Native pointer object
◆ open()
static KDB org.libelektra.KDB.open |
( |
final Key |
parentKey | ) |
|
|
inlinestatic |
Basic constructor of KDB class
Opens KDB session with the given parentKey to write possible warning and error information to.
- Parameters
-
parentKey | Parent key being used for this KDB session; it is used to store warning and error information |
- Returns
- New KDB session object
◆ set()
void org.libelektra.KDB.set |
( |
final KeySet |
ks, |
|
|
final Key |
parentKey |
|
) |
| throws KDBException |
|
inline |
Will update changed keys of the given keyset in the backend.
get() has to be called before this function may be executed.
- Parameters
-
ks | KeySet which contains keys to be updated in the backend |
parentKey | Is used to add warnings and set an error, if necessary |
- Exceptions
-
KDBException | In case of an error when storing keys |
The documentation for this class was generated from the following file: