$darkmode
Elektra 0.11.0
|
Represents a session with the Elektra key database. More...
Inherits AutoCloseable.
Public Member Functions | |
void | close () throws KDBException |
Closes the KDB session and frees native resources associated with it. More... | |
void | close (Key warningsKey) throws KDBException |
Closes the KDB session and frees native resources associated with it. More... | |
KeySet | get (Key parentKey) throws KDBException |
Fetches at least all keys that are sub-keys or children of sub-keys of the supplied parent key. More... | |
KDB | get (KeySet keySet, Key parentKey) throws KDBException |
Fetches at least all keys that are sub-keys or children of sub-keys of the supplied parent key. More... | |
KDB | set (KeySet keySet, Key parentKey) throws KDBException |
Will update changed keys of the given. More... | |
Static Public Member Functions | |
static KDB | open () throws KDBException |
Opens a new KDB session. More... | |
static KDB | open (KeySet contract) throws KDBException |
Opens KDB session using the specified. More... | |
static KDB | open (Key warningsKey) throws KDBException |
Opens a new KDB session. More... | |
static KDB | open (KeySet contract, Key warningsKey) throws KDBException |
Opens KDB session using the specified. More... | |
static KeySet | goptsContract (String[] args, String[] env, Key parentKey, KeySet goptsConfig) |
Creates a contract KeySet for use with KDB#open(KeySet) that mounts and configures the. More... | |
static void | goptsContract (KeySet contract, String[] args, String[] env, Key parentKey, KeySet goptsConfig) |
Writes a contract into a specified KeySet for use with KDB#open(KeySet) that mounts and configures the. More... | |
Protected Member Functions | |
Pointer | getPointer () |
Represents a session with the Elektra key database.
@apiNote Close after usage, or simply use a try-with-resources statement
|
inline |
Closes the KDB session and frees native resources associated with it.
KDBException | if opening the session fails - see specialization of KDBException |
KDBClosedException | if this session has already been closed |
|
inline |
Closes the KDB session and frees native resources associated with it.
warningsKey | Used to store warnings, which may occur during closing the session, in this key's meta data |
KDBException | if opening the session fails - see specialization of KDBException |
KDBClosedException | if this session has already been closed |
IllegalStateException | if parentKey
|
IllegalArgumentException | if warningsKey
null
|
|
inline |
Fetches at least all keys that are sub-keys or children of sub-keys of the supplied parent key.
Note: Resulting key set may contain more keys than requested
parentKey | Root key which name is used to fetch keys below. This key is also used to store warnings, which may occur during the operation, in this key's meta data. |
KDBException | if loading keys fails - see specialization of KDBException |
KDBClosedException | if this session has already been closed |
IllegalStateException | if parentKey
|
IllegalArgumentException |
|
inline |
Fetches at least all keys that are sub-keys or children of sub-keys of the supplied parent key.
Note: Resulting key set may contain more keys than requested
keySet | KeySet used to store the fetched keys |
parentKey | Root key which name is used to fetch keys below it. This key is also used to store warnings, which may occur during the operation, in this key's meta data. It is recommended to use the most specific parentKey
system:/
|
KDBException | if loading keys fails - see specialization of KDBException |
KDBClosedException | if this session has already been closed |
IllegalStateException | if keySet
parentKey
|
IllegalArgumentException | if keySet
parentKey
null
|
|
inlineprotected |
KDBClosedException | if this KDB session has already been closed |
|
inlinestatic |
Writes a contract into a specified KeySet for use with KDB#open(KeySet) that mounts and configures the.
plugin
contract | Key set to write the contract to |
args | Arguments that will be converted into argc
argv
gopts
|
env | Environment variables that gopts
|
parentKey | Parent key that should be used by gopts
|
goptsConfig | Config used for mounting the gopts
|
IllegalArgumentException | if any of the arguments are null
|
IllegalStateException | if contract
goptsConfig
parentKey
|
IllegalArgumentException | if any of the specified parameters is null
|
|
inlinestatic |
Creates a contract KeySet for use with KDB#open(KeySet) that mounts and configures the.
plugin
args | Arguments that will be converted into argc
argv
gopts
|
env | Environment variables that gopts
|
parentKey | Parent key that should be used by gopts
|
goptsConfig | Config used for mounting the gopts
|
IllegalArgumentException | if any of the arguments are null
|
IllegalStateException | if goptsConfig
parentKey
|
IllegalArgumentException | if any of the specified parameters is null
|
|
inlinestatic |
Opens a new KDB session.
KDBException | if opening the session fails - see specialization of KDBException |
|
inlinestatic |
Opens a new KDB session.
warningsKey | Used to store warnings, which may occur during opening the session, in this key's meta data |
KDBException | if opening the session fails - see specialization of KDBException |
IllegalStateException | if warningsKey
|
IllegalArgumentException | if warningsKey
null
|
|
inlinestatic |
Opens KDB session using the specified.
contract | Contract configuring the gopts
|
KDBException | if opening the session fails - see specialization of KDBException |
IllegalStateException | if contract
|
IllegalArgumentException | if contract
null
|
|
inlinestatic |
Opens KDB session using the specified.
contract | Contract configuring the gopts
|
warningsKey | Used to store warnings, which may occur during opening the session, in this key's meta data |
KDBException | if opening the session fails - see specialization of KDBException |
IllegalStateException | if contract
warningsKey
|
IllegalArgumentException | if contract
warningsKey
null
|
|
inline |
Will update changed keys of the given.
in the backend. get(Key) or get(KeySet, Key) has to be called before this function may be executed.