sysrepo
1.4.168
YANG datastore
|
Functions | |
int | sr_lock (sr_session_ctx_t *session, const char *module_name) |
Locks the data of the specified module or the whole datastore. More... | |
int | sr_unlock (sr_session_ctx_t *session, const char *module_name) |
Unlocks the data of the specified module or the whole datastore. More... | |
int | sr_get_lock (sr_conn_ctx_t *conn, sr_datastore_t datastore, const char *module_name, int *is_locked, uint32_t *id, uint32_t *nc_id, time_t *timestamp) |
Check whether the data of the specified module or the whole datastore are locked. More... | |
int sr_lock | ( | sr_session_ctx_t * | session, |
const char * | module_name | ||
) |
Locks the data of the specified module or the whole datastore.
Required READ access.
[in] | session | Session (DS-specific) to use. |
[in] | module_name | Optional name of the module to be locked. |
int sr_unlock | ( | sr_session_ctx_t * | session, |
const char * | module_name | ||
) |
int sr_get_lock | ( | sr_conn_ctx_t * | conn, |
sr_datastore_t | datastore, | ||
const char * | module_name, | ||
int * | is_locked, | ||
uint32_t * | id, | ||
uint32_t * | nc_id, | ||
time_t * | timestamp | ||
) |
Check whether the data of the specified module or the whole datastore are locked.
Note that if whole datastore is checked, is_locked
will be set only if all the modules are locked by the same Sysrepo session. If a module is not locked or locked by another Sysrepo session, is_locked
will be false.
[in] | conn | Connection to use. |
[in] | datastore | Datastore of the lock. |
[in] | module_name | Optional name of the module to check. |
[out] | is_locked | True is the module or whole datastore is locked. |
[out] | id | Optional Sysrepo SID of the session if the module/datastore is locked. |
[out] | nc_id | Deprecated, will never be set. |
[out] | timestamp | Optional timestamp of the lock. |