Qore ConnectionProvider Module Reference 2.0
|
Connection provider type cache class. More...
#include <ConnectionSchemeCache.qc.dox.h>
Static Public Member Methods | |
static bool | empty () |
Returns True if the cache is empty, False if not. | |
static hash< string, hash< ConnectionSchemeInfo > > | get () |
Returns the entire cache. | |
static *hash< auto > | getDefaultOptionValues (hash< ConnectionSchemeInfo > scheme_info) |
Returns default option values for the given connection scheme. More... | |
static *hash< auto > | getDefaultOptionValues (string scheme) |
Returns default option values for the given connection scheme. More... | |
static hash< string, hash< ConnectionSchemeInfo > > | getLoadAll () |
Loads all possible schemes and returns the entire cache. | |
static *hash< ConnectionSchemeInfo > | getScheme (string scheme) |
Returns info for the given connection scheme or NOTHING if not present. More... | |
static hash< ConnectionSchemeInfo > | getSchemeEx (string scheme) |
Returns info for the given connection scheme or throws an exception if not present. More... | |
static *hash< ConnectionSchemeInfo > | getSchemeImpl (string scheme, bool throw_exception, *code scheme_loader) |
Returns info for the given connection scheme; either throws an exception if not present or returns NOTHING. More... | |
static *list< string > | listSchemes () |
Returns a list of all cached schemes. | |
static bool | registerScheme (string scheme, hash< ConnectionSchemeInfo > entry) |
Register a new connection provider in the cache. More... | |
static int | size () |
Returns the number of types in the cache. | |
static hash< auto > | validateConnectionOptions (string conn_name, hash< ConnectionSchemeInfo > scheme_info, hash< auto > options, bool check_required=True) |
Checks and returns options. More... | |
static hash< auto > | validateConnectionOptions (string conn_name, string scheme, hash< auto > options, bool check_required=True) |
Checks and returns options. More... | |
Public Attributes | |
const | SchemeMap = ... |
Map of known connection schemes to modules. | |
Static Private Member Methods | |
static | deregisterScheme (string scheme) |
Deregisters a scheme in case module intiialization fails for the module that registered it. More... | |
static Mutex | lck () |
Connection provider cache lock. | |
static bool | tryLoadModule (string mod, bool throw_exception) |
Try to load the given module. | |
Static Private Attributes | |
static hash< string, hash< ConnectionSchemeInfo > > | cache |
Connection provider cache. | |
static bool | load_all |
Load all flag. | |
Connection provider type cache class.
|
staticprivate |
Deregisters a scheme in case module intiialization fails for the module that registered it.
scheme | the scheme for the connection provider |
|
static |
Returns default option values for the given connection scheme.
scheme_info | The connection scheme |
|
static |
Returns default option values for the given connection scheme.
scheme | The connection scheme name |
SCHEME-ERROR | unknown / unsupported scheme |
|
static |
|
static |
Returns info for the given connection scheme or throws an exception if not present.
scheme | the scheme for the connection provider |
SCHEME-ERROR | the scheme is unknown |
|
static |
Returns info for the given connection scheme; either throws an exception if not present or returns NOTHING.
scheme | the scheme for the connection provider |
throw_exception | if True then an exception is thrown if the scheme cannot be resolved, otherwise NOTHING is returned |
scheme_loader | a closure taking a string scheme argument and returning *hash<ConnectionSchemeInfo> |
SCHEME-ERROR | the scheme is unknown; only thrown if the throw_exception argument is True |
|
static |
Register a new connection provider in the cache.
scheme | the scheme for the connection provider |
entry | the new connection provider entry |
|
static |
Checks and returns options.
conn_name | The connection name, for error reporting only |
scheme_info | The connection scheme |
options | The options to validate |
check_required | Check required options? |
CONNECTION-OPTION-ERROR | missing or invalid connection option |
|
static |
Checks and returns options.
conn_name | The connection name, for error reporting only |
scheme | The connection scheme name |
options | The options to validate |
check_required | Check required options? |
CONNECTION-OPTION-ERROR | missing or invalid connection option |