stasis: Use an implementation specific channel snapshot cache.
authorJoshua Colp <jcolp@digium.com>
Wed, 10 Oct 2018 14:28:18 +0000 (11:28 -0300)
committerJoshua Colp <jcolp@digium.com>
Mon, 26 Nov 2018 18:43:53 +0000 (18:43 +0000)
commitd0ccbb3377cffc66519ca3c8819d06b36556177d
treef18876be647e5da52747149fbfdbe93f46f9cf56
parent0a60bc1a68e2ad939611bfe3ae4239a4d44e20a9
stasis: Use an implementation specific channel snapshot cache.

Channels no longer use the Stasis cache for channel snapshots. Instead
they are stored in a hash table in stasis_channels which reduces the
number of Stasis messages created and allows better storage.

As a result the following APIs are no longer available since the stasis
cache is no longer used:
ast_channel_topic_cached()
ast_channel_topic_all_cached()

The ast_channel_cache_all() and ast_channel_cache_by_name() functions
now return an ao2_container of ast_channel_snapshots rather than
a container of stasis_messages therefore you can't (and don't need
to) call stasis_cache functions on it.

The ast_channel_topic_all() function now returns a normal topic not
a cached one so you can't use stasis cache functions on it either.

The ast_channel_snapshot_type() stasis message now has the
ast_channel_snapshot_update structure as it's data. It contains the
last snapshot and the new one.

ast_channel_snapshot_get_latest() still returns the latest snapshot.

The latest snapshot is now stored on the channel itself to eliminate
cache hits when Stasis messages that have the snapshot as a payload
are created.

ASTERISK-28102

Change-Id: I9334febff60a82d7c39703e49059fa3a68825786
28 files changed:
CHANGES
UPGRADE.txt
apps/app_agent_pool.c
apps/confbridge/confbridge_manager.c
channels/chan_pjsip.c
channels/pjsip/cli_commands.c
include/asterisk/channel.h
include/asterisk/stasis_channels.h
main/aoc.c
main/app.c
main/bridge.c
main/cdr.c
main/cel.c
main/channel.c
main/channel_internal_api.c
main/cli.c
main/endpoints.c
main/manager.c
main/manager_bridges.c
main/manager_channels.c
main/stasis_channels.c
res/ari/resource_channels.c
res/res_agi.c
res/res_chan_stats.c
res/stasis/app.c
res/stasis/control.c
tests/test_cel.c
tests/test_stasis_endpoints.c