Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
Sorcery Memory Cache Object Wizard. More...
#include "asterisk.h"
#include "asterisk/module.h"
#include "asterisk/sorcery.h"
#include "asterisk/astobj2.h"
#include "asterisk/sched.h"
#include "asterisk/test.h"
#include "asterisk/heap.h"
#include "asterisk/cli.h"
#include "asterisk/manager.h"
Go to the source code of this file.
Data Structures | |
struct | print_object_details |
Structure used to pass data for printing cached object information. More... | |
struct | sorcery_memory_cache |
Structure for storing a memory cache. More... | |
struct | sorcery_memory_cache_fields_cmp_params |
Structure used for fields comparison. More... | |
struct | sorcery_memory_cached_object |
Structure for stored a cached object. More... | |
struct | stale_cache_update_task_data |
struct | stale_update_task_data |
Macros | |
#define | CACHE_CONTAINER_BUCKET_SIZE 53 |
The default bucket size for the container of objects in the cache. More... | |
#define | CACHE_HEAP_INIT_HEIGHT 5 |
Height of heap for cache object heap. Allows 31 initial objects. More... | |
#define | CACHES_CONTAINER_BUCKET_SIZE 53 |
The bucket size for the container of caches. More... | |
#define | FORMAT "%-25.25s %-15u %-15u \n" |
#define | FORMAT "%-25.25s %-15.15s %-15.15s \n" |
#define | PASSTHRU_UPDATE_THREAD_ID 0x5EED1E55 |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_GLOBAL_SYMBOLS | AST_MODFLAG_LOAD_ORDER , .description = "Sorcery Memory Cache Object Wizard" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_REALTIME_DRIVER, } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static struct ao2_container * | caches |
Container of created caches. More... | |
static struct ast_cli_entry | cli_memory_cache [] |
static struct ast_sorcery_wizard | memory_cache_object_wizard |
static struct ast_threadstorage | passthru_update_id_storage = { .once = PTHREAD_ONCE_INIT , .key_init = __init_passthru_update_id_storage , .custom_init = NULL , } |
static struct ast_sched_context * | sched |
Scheduler for cache management. More... | |
Sorcery Memory Cache Object Wizard.
Definition in file res_sorcery_memory_cache.c.
#define CACHE_CONTAINER_BUCKET_SIZE 53 |
The default bucket size for the container of objects in the cache.
Definition at line 235 of file res_sorcery_memory_cache.c.
#define CACHE_HEAP_INIT_HEIGHT 5 |
Height of heap for cache object heap. Allows 31 initial objects.
Definition at line 238 of file res_sorcery_memory_cache.c.
#define CACHES_CONTAINER_BUCKET_SIZE 53 |
The bucket size for the container of caches.
Definition at line 232 of file res_sorcery_memory_cache.c.
#define FORMAT "%-25.25s %-15u %-15u \n" |
#define FORMAT "%-25.25s %-15.15s %-15.15s \n" |
#define PASSTHRU_UPDATE_THREAD_ID 0x5EED1E55 |
Definition at line 246 of file res_sorcery_memory_cache.c.
|
static |
Definition at line 247 of file res_sorcery_memory_cache.c.
|
static |
Definition at line 3603 of file res_sorcery_memory_cache.c.
|
static |
Definition at line 3603 of file res_sorcery_memory_cache.c.
|
static |
Definition at line 728 of file res_sorcery_memory_cache.c.
References ao2_find, ao2_link_flags, ast_heap_peek(), ast_heap_push, cache, sorcery_memory_cached_object::created, OBJ_NODATA, OBJ_NOLOCK, OBJ_SEARCH_OBJECT, OBJ_UNLINK, and schedule_cache_expiration().
Referenced by object_add_to_cache_callback(), and sorcery_memory_cache_create().
|
static |
Definition at line 1493 of file res_sorcery_memory_cache.c.
References a, ast_tvcmp(), and b.
Referenced by sorcery_memory_cache_open().
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 3603 of file res_sorcery_memory_cache.c.
|
static |
Definition at line 1484 of file res_sorcery_memory_cache.c.
References ast_strlen_zero(), result, and value.
Referenced by sorcery_memory_cache_open().
|
static |
Definition at line 281 of file res_sorcery_memory_cache.c.
References set_passthru_update().
Referenced by memory_cache_populate(), stale_cache_update(), and stale_item_update().
|
static |
Definition at line 498 of file res_sorcery_memory_cache.c.
References ao2_ref, ao2_trywrlock, ao2_unlock, ast_heap_peek(), ast_samp2tv(), ast_sorcery_object_get_id(), ast_tvadd(), ast_tvdiff_ms(), ast_tvnow(), cache, sorcery_memory_cached_object::created, sorcery_memory_cached_object::object, remove_from_cache(), and schedule_cache_expiration().
Referenced by schedule_cache_expiration().
|
static |
Definition at line 249 of file res_sorcery_memory_cache.c.
References ast_threadstorage_get(), passthru_update_id_storage, and PASSTHRU_UPDATE_THREAD_ID.
Referenced by sorcery_memory_cache_retrieve_fields(), sorcery_memory_cache_retrieve_id(), sorcery_memory_cache_retrieve_multiple(), sorcery_memory_cache_retrieve_prefix(), and sorcery_memory_cache_retrieve_regex().
|
static |
Definition at line 3538 of file res_sorcery_memory_cache.c.
References AO2_ALLOC_OPT_LOCK_MUTEX, ao2_container_alloc_hash, ARRAY_LEN, ast_cli_register_multiple, ast_log, ast_manager_register_xml, AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, ast_sched_context_create(), ast_sched_start_thread(), ast_sorcery_wizard_register, AST_TEST_REGISTER, caches, CACHES_CONTAINER_BUCKET_SIZE, cli_memory_cache, EVENT_FLAG_SYSTEM, LOG_ERROR, memory_cache_object_wizard, NULL, sorcery_memory_cache_ami_expire(), sorcery_memory_cache_ami_expire_object(), sorcery_memory_cache_ami_populate(), sorcery_memory_cache_ami_stale(), sorcery_memory_cache_ami_stale_object(), sorcery_memory_cache_cmp(), sorcery_memory_cache_hash(), unload_module(), and update().
|
static |
Definition at line 632 of file res_sorcery_memory_cache.c.
References ao2_callback, cache, OBJ_MULTIPLE, OBJ_NODATA, OBJ_NOLOCK, and object_stale_callback().
Referenced by sorcery_memory_cache_ami_stale(), and sorcery_memory_cache_stale().
|
static |
Definition at line 605 of file res_sorcery_memory_cache.c.
References ao2_find, ao2_ref, ast_assert, ast_sorcery_object_get_id(), cache, OBJ_NOLOCK, OBJ_SEARCH_KEY, sorcery_memory_cached_object::object, and object_stale_callback().
Referenced by sorcery_memory_cache_ami_stale_object(), and sorcery_memory_cache_stale().
|
static |
Definition at line 1077 of file res_sorcery_memory_cache.c.
References ao2_container_count(), ao2_unlock, ao2_wrlock, cache, memory_cache_populate(), sorcery, and type.
Referenced by sorcery_memory_cache_retrieve_id(), sorcery_memory_cache_retrieve_multiple(), sorcery_memory_cache_retrieve_prefix(), and sorcery_memory_cache_retrieve_regex().
|
static |
Definition at line 1034 of file res_sorcery_memory_cache.c.
References ao2_callback_data, ao2_container_count(), ao2_ref, ast_log, AST_RETRIEVE_FLAG_ALL, AST_RETRIEVE_FLAG_MULTIPLE, ast_sorcery_retrieve_by_fields(), cache, end_passthru_update(), LOG_ERROR, LOG_WARNING, NULL, OBJ_MULTIPLE, OBJ_NODATA, OBJ_NOLOCK, object_add_to_cache_callback(), remove_all_from_cache(), sorcery, start_passthru_update(), and type.
Referenced by memory_cache_full_update(), sorcery_memory_cache_ami_populate(), and sorcery_memory_cache_populate().
|
static |
Definition at line 1191 of file res_sorcery_memory_cache.c.
References ao2_bump, ao2_rdlock, ao2_ref, ao2_unlock, ast_heap_peek(), cache, memory_cache_stale_check_object(), and sorcery.
Referenced by sorcery_memory_cache_retrieve_multiple(), sorcery_memory_cache_retrieve_prefix(), and sorcery_memory_cache_retrieve_regex().
|
static |
Definition at line 1158 of file res_sorcery_memory_cache.c.
References ast_sorcery_object_get_type(), ast_tvnow(), ast_tvsub(), cache, sorcery_memory_cached_object::created, memory_cache_stale_update_full(), memory_cache_stale_update_object(), sorcery_memory_cached_object::object, and sorcery.
Referenced by memory_cache_stale_check(), sorcery_memory_cache_retrieve_fields(), and sorcery_memory_cache_retrieve_id().
|
static |
Definition at line 1098 of file res_sorcery_memory_cache.c.
References ao2_cleanup, ao2_unlock, ao2_wrlock, ast_sched_add(), cache, sorcery, stale_cache_update(), stale_cache_update_task_data_alloc(), and type.
Referenced by memory_cache_stale_check_object().
|
static |
Definition at line 1126 of file res_sorcery_memory_cache.c.
References ao2_cleanup, ao2_lock, ao2_unlock, ast_debug, ast_log, ast_sched_add(), ast_sorcery_object_get_id(), ast_sorcery_object_get_type(), cache, LOG_ERROR, sorcery_memory_cached_object::object, sorcery, stale_item_update(), sorcery_memory_cached_object::stale_update_sched_id, and stale_update_task_data_alloc().
Referenced by memory_cache_stale_check_object(), sorcery_memory_cache_ami_stale_object(), and sorcery_memory_cache_stale().
|
static |
Definition at line 855 of file res_sorcery_memory_cache.c.
References add_to_cache(), ao2_ref, cache, CMP_STOP, and sorcery_memory_cached_object_alloc().
Referenced by memory_cache_populate(), and stale_cache_update().
|
static |
Definition at line 577 of file res_sorcery_memory_cache.c.
References ast_samp2tv(), ast_tvsub(), cache, CMP_MATCH, and sorcery_memory_cached_object::created.
Referenced by mark_all_as_stale_in_cache(), and mark_object_as_stale_in_cache().
|
static |
Definition at line 554 of file res_sorcery_memory_cache.c.
References ao2_callback, ao2_ref, ast_heap_pop(), AST_SCHED_DEL_UNREF, cache, NULL, OBJ_MULTIPLE, OBJ_NODATA, OBJ_NOLOCK, and OBJ_UNLINK.
Referenced by memory_cache_populate(), sorcery_memory_cache_ami_expire(), sorcery_memory_cache_ami_populate(), sorcery_memory_cache_close(), sorcery_memory_cache_expire(), sorcery_memory_cache_populate(), sorcery_memory_cache_reload(), and stale_cache_update().
|
static |
Definition at line 465 of file res_sorcery_memory_cache.c.
References ao2_find, ao2_ref, ast_assert, ast_heap_peek(), ast_heap_remove(), ast_sorcery_object_get_id(), cache, OBJ_NOLOCK, OBJ_SEARCH_KEY, OBJ_UNLINK, sorcery_memory_cached_object::object, and schedule_cache_expiration().
Referenced by expire_objects_from_cache(), sorcery_memory_cache_ami_expire_object(), sorcery_memory_cache_create(), sorcery_memory_cache_delete(), and sorcery_memory_cache_expire().
|
static |
Definition at line 695 of file res_sorcery_memory_cache.c.
References ao2_find, ao2_ref, ast_assert, ast_heap_pop(), cache, OBJ_NOLOCK, OBJ_SEARCH_OBJECT, OBJ_UNLINK, and schedule_cache_expiration().
Referenced by sorcery_memory_cache_create().
|
static |
Definition at line 648 of file res_sorcery_memory_cache.c.
References ao2_bump, ao2_ref, ast_cond_signal, ast_heap_peek(), ast_mutex_lock, ast_mutex_unlock, ast_samp2tv(), ast_sched_add(), AST_SCHED_DEL_UNREF, ast_tvadd(), ast_tvdiff_ms(), ast_tvnow(), cache, sorcery_memory_cached_object::created, expire_objects_from_cache(), and MAX.
Referenced by add_to_cache(), expire_objects_from_cache(), remove_from_cache(), and remove_oldest_from_cache().
|
static |
Definition at line 262 of file res_sorcery_memory_cache.c.
References ast_log, ast_threadstorage_get(), LOG_ERROR, passthru_update_id_storage, and value.
Referenced by end_passthru_update(), and start_passthru_update().
|
static |
Definition at line 2115 of file res_sorcery_memory_cache.c.
References ao2_find, ao2_ref, ao2_unlock, ao2_wrlock, ast_strlen_zero(), astman_get_header(), astman_send_ack(), astman_send_error(), cache, caches, OBJ_SEARCH_KEY, and remove_all_from_cache().
Referenced by load_module().
|
static |
Definition at line 2069 of file res_sorcery_memory_cache.c.
References ao2_find, ao2_ref, ao2_unlock, ao2_wrlock, ast_strlen_zero(), astman_get_header(), astman_send_ack(), astman_send_error(), cache, caches, OBJ_SEARCH_KEY, and remove_from_cache().
Referenced by load_module().
|
static |
Definition at line 2230 of file res_sorcery_memory_cache.c.
References ao2_find, ao2_ref, ao2_unlock, ao2_wrlock, ast_strlen_zero(), astman_get_header(), astman_send_ack(), astman_send_error(), cache, caches, memory_cache_populate(), OBJ_SEARCH_KEY, and remove_all_from_cache().
Referenced by load_module().
|
static |
Definition at line 2199 of file res_sorcery_memory_cache.c.
References ao2_find, ao2_rdlock, ao2_ref, ao2_unlock, ast_strlen_zero(), astman_get_header(), astman_send_ack(), astman_send_error(), cache, caches, mark_all_as_stale_in_cache(), and OBJ_SEARCH_KEY.
Referenced by load_module().
|
static |
Definition at line 2146 of file res_sorcery_memory_cache.c.
References ao2_find, ao2_rdlock, ao2_ref, ao2_unlock, ast_strlen_zero(), ast_true(), astman_get_header(), astman_send_ack(), astman_send_error(), cache, caches, mark_object_as_stale_in_cache(), memory_cache_stale_update_object(), OBJ_NOLOCK, OBJ_SEARCH_KEY, and reload().
Referenced by load_module().
|
static |
Definition at line 1620 of file res_sorcery_memory_cache.c.
References ao2_ref, ao2_unlink, ao2_unlock, ao2_wrlock, ast_strlen_zero(), cache, caches, NULL, and remove_all_from_cache().
|
static |
Definition at line 329 of file res_sorcery_memory_cache.c.
References CMP_MATCH, sorcery_memory_cache::name, OBJ_SEARCH_KEY, OBJ_SEARCH_MASK, OBJ_SEARCH_OBJECT, and OBJ_SEARCH_PARTIAL_KEY.
Referenced by load_module().
|
static |
Definition at line 1652 of file res_sorcery_memory_cache.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, ast_strdup, cache, caches, NULL, and result.
Referenced by sorcery_memory_cache_dump(), sorcery_memory_cache_expire(), sorcery_memory_cache_populate(), sorcery_memory_cache_show(), and sorcery_memory_cache_stale().
|
static |
Definition at line 1825 of file res_sorcery_memory_cache.c.
References ao2_find, ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, ast_sorcery_object_get_id(), ast_strdup, cache, caches, NULL, OBJ_SEARCH_KEY, sorcery_memory_cached_object::object, and result.
Referenced by sorcery_memory_cache_expire(), and sorcery_memory_cache_stale().
|
static |
Definition at line 805 of file res_sorcery_memory_cache.c.
References add_to_cache(), ao2_container_count(), ao2_ref, ao2_unlock, ao2_wrlock, ast_assert, ast_log, ast_sorcery_object_get_id(), cache, LOG_ERROR, remove_from_cache(), remove_oldest_from_cache(), sorcery, and sorcery_memory_cached_object_alloc().
Referenced by stale_item_update().
|
static |
Definition at line 1598 of file res_sorcery_memory_cache.c.
References ao2_unlock, ao2_wrlock, ast_debug, ast_sorcery_object_get_id(), cache, and remove_from_cache().
Referenced by stale_item_update().
|
static |
Definition at line 422 of file res_sorcery_memory_cache.c.
References ao2_cleanup, ast_free, ast_heap_destroy(), and cache.
Referenced by sorcery_memory_cache_open().
|
static |
Definition at line 1768 of file res_sorcery_memory_cache.c.
References print_object_details::a, a, ao2_callback, ao2_container_count(), ao2_find, ao2_ref, ast_cli(), cache, print_object_details::cache, caches, CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, FORMAT, NULL, OBJ_MULTIPLE, OBJ_NODATA, OBJ_SEARCH_KEY, sorcery_memory_cache_complete_name(), sorcery_memory_cache_print_object(), and ast_cli_entry::usage.
|
static |
Definition at line 1861 of file res_sorcery_memory_cache.c.
References a, ao2_find, ao2_ref, ao2_unlock, ao2_wrlock, ast_cli(), cache, caches, CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, NULL, OBJ_SEARCH_KEY, remove_all_from_cache(), remove_from_cache(), sorcery_memory_cache_complete_name(), sorcery_memory_cache_complete_object_name(), and ast_cli_entry::usage.
|
static |
Definition at line 1254 of file res_sorcery_memory_cache.c.
References ao2_link, ast_sorcery_object_get_id(), ast_variable_lists_match(), ast_variables_destroy(), CMP_MATCH, CMP_STOP, sorcery_memory_cache_fields_cmp_params::container, sorcery_memory_cache_fields_cmp_params::fields, NULL, sorcery_memory_cached_object::object, sorcery_memory_cached_object::objectset, sorcery_memory_cache_fields_cmp_params::prefix, sorcery_memory_cache_fields_cmp_params::prefix_len, RAII_VAR, and sorcery_memory_cache_fields_cmp_params::regex.
Referenced by sorcery_memory_cache_retrieve_fields(), sorcery_memory_cache_retrieve_multiple(), sorcery_memory_cache_retrieve_prefix(), and sorcery_memory_cache_retrieve_regex().
|
static |
Definition at line 295 of file res_sorcery_memory_cache.c.
References ast_assert, ast_str_hash(), cache, name, OBJ_SEARCH_KEY, OBJ_SEARCH_MASK, OBJ_SEARCH_OBJECT, and OBJ_SEARCH_PARTIAL_KEY.
Referenced by load_module().
|
static |
Definition at line 1436 of file res_sorcery_memory_cache.c.
References ao2_link, ast_asprintf, ast_debug, ast_sorcery_get_module(), ast_strdup, ast_strlen_zero(), cache, caches, sorcery, and type.
|
static |
Definition at line 1508 of file res_sorcery_memory_cache.c.
References age_cmp(), AO2_ALLOC_OPT_LOCK_NOLOCK, AO2_ALLOC_OPT_LOCK_RWLOCK, ao2_alloc_options, ao2_bump, ao2_cleanup, ao2_container_alloc_hash, ast_free, ast_heap_create, ast_log, ast_strdup, ast_strdupa, ast_strlen_zero(), ast_true(), cache, CACHE_CONTAINER_BUCKET_SIZE, CACHE_HEAP_INIT_HEIGHT, configuration_parse_unsigned_integer(), LOG_ERROR, name, NULL, options, RAII_VAR, sorcery_memory_cache_destructor(), sorcery_memory_cached_object_cmp(), sorcery_memory_cached_object_hash(), strsep(), and value.
|
static |
Definition at line 2001 of file res_sorcery_memory_cache.c.
References a, ao2_container_count(), ao2_find, ao2_ref, ao2_unlock, ao2_wrlock, ast_cli(), cache, caches, CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, memory_cache_populate(), NULL, OBJ_SEARCH_KEY, remove_all_from_cache(), sorcery_memory_cache_complete_name(), and ast_cli_entry::usage.
|
static |
Definition at line 1744 of file res_sorcery_memory_cache.c.
References print_object_details::a, ast_cli(), ast_samp2tv(), ast_sorcery_object_get_id(), ast_tvadd(), ast_tvdiff_ms(), ast_tvnow(), print_object_details::cache, CMP_MATCH, sorcery_memory_cached_object::created, ast_cli_args::fd, FORMAT, MAX, sorcery_memory_cached_object::object, sorcery_memory_cache::object_lifetime_maximum, and sorcery_memory_cache::object_lifetime_stale.
Referenced by sorcery_memory_cache_dump().
|
static |
Definition at line 1461 of file res_sorcery_memory_cache.c.
References ao2_unlock, ao2_wrlock, cache, and remove_all_from_cache().
|
static |
Definition at line 1299 of file res_sorcery_memory_cache.c.
References ao2_bump, ao2_callback, ao2_ref, cache, sorcery_memory_cache_fields_cmp_params::fields, is_passthru_update(), memory_cache_stale_check_object(), NULL, sorcery_memory_cached_object::object, sorcery, sorcery_memory_cache_fields_cmp_params::sorcery, and sorcery_memory_cache_fields_cmp().
|
static |
Definition at line 1219 of file res_sorcery_memory_cache.c.
References ao2_bump, ao2_find, ao2_ref, ast_assert, ast_sorcery_object_get_id(), cache, is_passthru_update(), memory_cache_full_update(), memory_cache_stale_check_object(), NULL, OBJ_SEARCH_KEY, sorcery_memory_cached_object::object, sorcery, and type.
|
static |
Definition at line 1336 of file res_sorcery_memory_cache.c.
References ao2_callback, ao2_container_count(), cache, sorcery_memory_cache_fields_cmp_params::fields, is_passthru_update(), memory_cache_full_update(), memory_cache_stale_check(), sorcery, sorcery_memory_cache_fields_cmp_params::sorcery, sorcery_memory_cache_fields_cmp(), and type.
|
static |
Definition at line 1404 of file res_sorcery_memory_cache.c.
References ao2_callback, ao2_container_count(), cache, is_passthru_update(), memory_cache_full_update(), memory_cache_stale_check(), prefix, sorcery_memory_cache_fields_cmp_params::prefix_len, sorcery, sorcery_memory_cache_fields_cmp_params::sorcery, sorcery_memory_cache_fields_cmp(), and type.
|
static |
Definition at line 1369 of file res_sorcery_memory_cache.c.
References ao2_callback, ao2_container_count(), cache, is_passthru_update(), memory_cache_full_update(), memory_cache_stale_check(), regex(), sorcery, sorcery_memory_cache_fields_cmp_params::sorcery, sorcery_memory_cache_fields_cmp(), and type.
|
static |
Definition at line 1679 of file res_sorcery_memory_cache.c.
References a, ao2_container_count(), ao2_find, ao2_ref, ast_cli(), AST_CLI_ONOFF, cache, caches, CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, NULL, OBJ_SEARCH_KEY, sorcery_memory_cache_complete_name(), and ast_cli_entry::usage.
|
static |
Definition at line 1917 of file res_sorcery_memory_cache.c.
References a, ao2_find, ao2_rdlock, ao2_ref, ao2_unlock, ast_cli(), ast_cli_complete(), cache, caches, CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, mark_all_as_stale_in_cache(), mark_object_as_stale_in_cache(), memory_cache_stale_update_object(), NULL, OBJ_NOLOCK, OBJ_SEARCH_KEY, reload(), sorcery_memory_cache_complete_name(), sorcery_memory_cache_complete_object_name(), and ast_cli_entry::usage.
|
static |
Definition at line 766 of file res_sorcery_memory_cache.c.
References ao2_alloc, ao2_bump, ao2_ref, ast_sorcery_objectset_create, ast_tvnow(), cache, sorcery_memory_cached_object::created, NULL, sorcery_memory_cached_object::object, sorcery_memory_cached_object::objectset, sorcery, sorcery_memory_cached_object_destructor(), and sorcery_memory_cached_object::stale_update_sched_id.
Referenced by object_add_to_cache_callback(), and sorcery_memory_cache_create().
|
static |
Definition at line 394 of file res_sorcery_memory_cache.c.
References ast_sorcery_object_get_id(), CMP_MATCH, OBJ_SEARCH_KEY, OBJ_SEARCH_MASK, OBJ_SEARCH_OBJECT, OBJ_SEARCH_PARTIAL_KEY, and sorcery_memory_cached_object::object.
Referenced by sorcery_memory_cache_open().
|
static |
Definition at line 440 of file res_sorcery_memory_cache.c.
References ao2_cleanup, ast_variables_destroy(), sorcery_memory_cached_object::object, and sorcery_memory_cached_object::objectset.
Referenced by sorcery_memory_cached_object_alloc().
|
static |
Definition at line 360 of file res_sorcery_memory_cache.c.
References ast_assert, ast_sorcery_object_get_id(), ast_str_hash(), name, OBJ_SEARCH_KEY, OBJ_SEARCH_MASK, OBJ_SEARCH_OBJECT, OBJ_SEARCH_PARTIAL_KEY, and sorcery_memory_cached_object::object.
Referenced by sorcery_memory_cache_open().
|
static |
Definition at line 908 of file res_sorcery_memory_cache.c.
References ao2_callback_data, ao2_container_count(), ao2_ref, ao2_unlock, ao2_wrlock, ast_log, AST_RETRIEVE_FLAG_ALL, AST_RETRIEVE_FLAG_MULTIPLE, ast_sorcery_retrieve_by_fields(), end_passthru_update(), LOG_ERROR, LOG_WARNING, NULL, OBJ_MULTIPLE, OBJ_NODATA, OBJ_NOLOCK, object_add_to_cache_callback(), remove_all_from_cache(), and start_passthru_update().
Referenced by memory_cache_stale_update_full().
|
static |
Definition at line 886 of file res_sorcery_memory_cache.c.
References AO2_ALLOC_OPT_LOCK_NOLOCK, ao2_alloc_options, ao2_bump, ao2_ref, ast_strdup, cache, NULL, sorcery, stale_cache_update_task_data_destructor(), and type.
Referenced by memory_cache_stale_update_full().
|
static |
Definition at line 877 of file res_sorcery_memory_cache.c.
References ao2_cleanup, ast_free, and ast_sorcery_unref.
Referenced by stale_cache_update_task_data_alloc().
|
static |
Definition at line 989 of file res_sorcery_memory_cache.c.
References ao2_ref, ast_debug, ast_sorcery_object_get_id(), ast_sorcery_object_get_type(), ast_sorcery_retrieve_by_id(), ast_test_suite_event_notify, end_passthru_update(), stale_update_task_data::object, sorcery_memory_cache_create(), sorcery_memory_cache_delete(), and start_passthru_update().
Referenced by memory_cache_stale_update_object().
|
static |
Definition at line 971 of file res_sorcery_memory_cache.c.
References AO2_ALLOC_OPT_LOCK_NOLOCK, ao2_alloc_options, ao2_bump, cache, NULL, sorcery, and stale_update_task_data_destructor().
Referenced by memory_cache_stale_update_object().
|
static |
Definition at line 962 of file res_sorcery_memory_cache.c.
References ao2_cleanup, and ast_sorcery_unref.
Referenced by stale_update_task_data_alloc().
|
static |
Definition at line 276 of file res_sorcery_memory_cache.c.
References PASSTHRU_UPDATE_THREAD_ID, and set_passthru_update().
Referenced by memory_cache_populate(), stale_cache_update(), and stale_item_update().
|
static |
Definition at line 3500 of file res_sorcery_memory_cache.c.
References ao2_cleanup, ARRAY_LEN, ast_cli_unregister_multiple(), ast_manager_unregister(), ast_sched_context_destroy(), ast_sorcery_wizard_unregister(), AST_TEST_UNREGISTER, caches, cli_memory_cache, memory_cache_object_wizard, NULL, and update().
Referenced by load_module().
|
static |
Definition at line 3603 of file res_sorcery_memory_cache.c.
|
static |
Definition at line 3603 of file res_sorcery_memory_cache.c.
|
static |
Container of created caches.
Definition at line 241 of file res_sorcery_memory_cache.c.
Referenced by load_module(), sorcery_memory_cache_ami_expire(), sorcery_memory_cache_ami_expire_object(), sorcery_memory_cache_ami_populate(), sorcery_memory_cache_ami_stale(), sorcery_memory_cache_ami_stale_object(), sorcery_memory_cache_close(), sorcery_memory_cache_complete_name(), sorcery_memory_cache_complete_object_name(), sorcery_memory_cache_dump(), sorcery_memory_cache_expire(), sorcery_memory_cache_load(), sorcery_memory_cache_populate(), sorcery_memory_cache_show(), sorcery_memory_cache_stale(), and unload_module().
|
static |
Definition at line 2057 of file res_sorcery_memory_cache.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 215 of file res_sorcery_memory_cache.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 247 of file res_sorcery_memory_cache.c.
Referenced by is_passthru_update(), and set_passthru_update().
|
static |
Scheduler for cache management.
Definition at line 244 of file res_sorcery_memory_cache.c.