<p>Kevin Harwell <strong>uploaded patch set #2</strong> to this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/11462">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">stasis_state: Add new stasis_state module<br><br>This new module describes an API that can be thought of as a combination of<br>stasis topic pools, and caching. Except, hopefully done in a more efficient<br>and less memory "leaky" manner.<br><br>The API defines methods, and data structures for managing, and tracking<br>published message state through stasis. By adding a subscriber or publisher,<br>consumers can more easily track the lifetime of the contained state. For<br>instance, when no more publishers and/or subscribers have need of the topic,<br>and associated state its data is removed from the managed container.<br><br>* stasis_state_manager *<br><br>The manager stores and well, manages state data. Each state is an association<br>of a unique stasis topic, and the last known published stasis message on that<br>topic. There is only ever one managed state object per topic. For each topic<br>all messages are forwarded to an "all" topic also maintained by the manager.<br><br>* stasis_state_subscriber *<br><br>Topic and state can be created, or referenced within the manager by adding a<br>stasis_state_subscriber. When adding a subscriber if no state currently exists<br>new managed state is immediately created. If managed state already exists then<br>a new subscriber is created referencing that state. The managed state is<br>guaranteed to live throughout the subscriber's lifetime. State is only removed<br>from the manager when no other entities require it.<br><br>* stasis_state_publisher *<br><br>Topic and state can be created, or referenced within the manager by also adding<br>a stasis_state_publisher. When adding a publisher if no state currently exists<br>new managed state is created. If managed state already exists then a new<br>publisher is created referencing that state. The managed state is guaranteed to<br>live throughout the publisher's lifetime. State is only removed from the<br>manager when no other entities require it.<br><br>* stasis_state_observer *<br><br>Some modules may wish to watch for, and react to managed state events. By<br>registering a state observer, and implementing handlers for the desired<br>callbacks those modules can do so.<br><br>* other *<br><br>Callbacks also exist that allow consumers to iterate over all, or some of the<br>managed state.<br><br>ASTERISK-28442<br><br>Change-Id: I7a4a06685a96e511da9f5bd23f9601642d7bd8e5<br>---<br>A include/asterisk/stasis_state.h<br>A main/stasis_state.c<br>A tests/test_stasis_state.c<br>3 files changed, 1,774 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/62/11462/2</pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/11462">change 11462</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/11462"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I7a4a06685a96e511da9f5bd23f9601642d7bd8e5 </div>
<div style="display:none"> Gerrit-Change-Number: 11462 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: newpatchset </div>