[asterisk-scf-commits] asterisk-scf/integration/slice.git branch "queue-shutdown" created.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Mon Jun 6 16:07:13 CDT 2011


branch "queue-shutdown" has been created
        at  f6073fff0cdda2017d9cb15fe137e53bb595f444 (commit)

- Log -----------------------------------------------------------------
commit f6073fff0cdda2017d9cb15fe137e53bb595f444
Author: Mark Michelson <mmichelson at digium.com>
Date:   Mon Jun 6 16:06:08 2011 -0500

    Add a QueueBase interface and pass one into all QueueListener calls.

diff --git a/AsteriskSCF/System/WorkQueue/WorkQueueIf.ice b/AsteriskSCF/System/WorkQueue/WorkQueueIf.ice
index d966295..7de0cb4 100644
--- a/AsteriskSCF/System/WorkQueue/WorkQueueIf.ice
+++ b/AsteriskSCF/System/WorkQueue/WorkQueueIf.ice
@@ -27,7 +27,9 @@ module WorkQueue
 
 module V1
 {
-    
+
+    local interface QueueBase;
+
     /**
      * Receiver of event notices from a Queue or SuspendableQueue
      *
@@ -43,24 +45,71 @@ module V1
          * @param wasEmpty True if the queue was empty prior
          * to the addition of the work. False otherwise.
          */
-        void workAdded(long numNewWork, bool wasEmpty);
+        void workAdded(QueueBase q, long numNewWork, bool wasEmpty);
 
         /**
-         * Indicates that suspended work may be resumed
-         *
-         * This method is only ever called by SuspendableQueues
+         * Indicates that the Queue or SuspendableQueue is now empty
          */
-        void workResumable();
+        void emptied(QueueBase q);
 
         /**
-         * Indicates that the Queue or SuspendableQueue is now empty
+         * Indicates that work may be resumed
          */
-        void emptied();
+        void workResumable(QueueBase q);
 
         /**
          * Indicates that the Queue or SuspendableQueue is being shut down
          */
-        void shuttingDown();
+        void shuttingDown(QueueBase q);
+    };
+    
+    /**
+     * Exception thrown when attempting to run an operation on a Queue
+     * or SuspendableQueue that has been told to shut down.
+     * that has been told to shut down.
+     */
+    local exception ShuttingDown
+    {
+    };
+
+    local interface QueueBase
+    {
+        /**
+         * Pop the front item from the queue and call its execute() method
+         *
+         * @retval true The queue contains more Work to be executed
+         * @retval false The queue contains no more Work objects
+         */
+       	bool executeWork() throws ShuttingDown;
+
+        /**
+         * Obtain a snapshot of the number of items in the Queue.
+         *
+         * Given that multiple threads may be adding and removing
+         * items from the queue, this should be taken as a hint of
+         * how many items there are rather than as gospel.
+         *
+         * @return The number of Work objects in the Queue
+         */
+       	long getSize() throws ShuttingDown;
+
+        /**
+         * Set a new QueueListener
+         *
+         * If the Queue currently has a listener, then the new
+         * one will replace its old listener.
+         *
+         * @param listener The new QueueListener to set
+         */
+        void setListener(QueueListener listener) throws ShuttingDown;
+
+        /**
+         * Shut a queue down
+         *
+         * Signals the queue that no further work shall be added
+         * or executed.
+         */
+        void shutDown() throws ShuttingDown;
     };
 
     /**
@@ -87,21 +136,13 @@ module V1
     {
     };
 
-    /**
-     * Exception thrown when attempting to run an operation on a Queue
-     * or SuspendableQueue that has been told to shut down.
-     * that has been told to shut down.
-     */
-    local exception ShuttingDown
-    {
-    };
-
+    
     /**
      * A standard work queue
      *
      * Queues maintain a thread-safe FIFO of Work
      */
-    local interface Queue
+    local interface Queue extends QueueBase
     {
         /**
          * Enqueue a single item of Work
@@ -132,42 +173,6 @@ module V1
          */
        	void cancelWork(Work item) throws ShuttingDown;
 
-        /**
-         * Pop the front item from the queue and call its execute() method
-         *
-         * @retval true The queue contains more Work to be executed
-         * @retval false The queue contains no more Work objects
-         */
-       	bool executeWork() throws ShuttingDown;
-
-        /**
-         * Obtain a snapshot of the number of items in the Queue.
-         *
-         * Given that multiple threads may be adding and removing
-         * items from the queue, this should be taken as a hint of
-         * how many items there are rather than as gospel.
-         *
-         * @return The number of Work objects in the Queue
-         */
-       	long getSize() throws ShuttingDown;
-
-        /**
-         * Set a new QueueListener
-         *
-         * If the Queue currently has a listener, then the new
-         * one will replace its old listener.
-         *
-         * @param listener The new QueueListener to set
-         */
-        void setListener(QueueListener listener) throws ShuttingDown;
-
-        /**
-         * Shut a queue down
-         *
-         * Signals the queue that no further work shall be added
-         * or executed.
-         */
-        void shutDown() throws ShuttingDown;
     };
 
     /**
@@ -224,7 +229,7 @@ module V1
      * of work makes an asynchronous RPC and does not wish to
      * block the thread that is executing work.
      */
-    local interface SuspendableQueue
+    local interface SuspendableQueue extends QueueBase
     {
         /**
          * Enqueue a single item of SuspendableWork
@@ -256,46 +261,6 @@ module V1
          * @param item The item to be canceled
          */
        	void cancelWork(SuspendableWork item) throws WorkInProgress, ShuttingDown;
-       
-        /**
-         * Pop the front item from the queue and call its execute() method
-         *
-         * @retval true The queue contains more SuspendableWork that may
-         * be immediately executed
-         * @retval false The queue either contains no more SuspendableWork
-         * items OR the item executed returned a Suspended result.
-         */
-       	bool executeWork() throws ShuttingDown;
-
-        /**
-         * Obtain a snapshot of the number of items in the SuspendableQueue.
-         *
-         * Given that multiple threads may be adding and removing
-         * items from the queue, this should be taken as a hint of
-         * how many items there are rather than as gospel.
-         *
-         * @return The number of SuspendableWork objects in the
-         * SuspendableQueue
-         */
-       	long getSize() throws ShuttingDown;
-
-        /**
-         * Set a new QueueListener
-         *
-         * If the SuspendableQueue currently has a listener, then the new
-         * one will replace its old listener.
-         *
-         * @param listener The new QueueListener to set
-         */
-        void setListener(QueueListener listener) throws ShuttingDown;
-
-        /**
-         * Shut a SuspendableQueue down.
-         * 
-         * Signals the SuspendableQueue that no further work shall be added
-         * or executed
-         */
-        void shutDown() throws ShuttingDown;
     };
 
 }; /* End of V1 */

commit aa3d3e031f0e4d824532b9b91b506cf8513ad880
Author: Mark Michelson <mmichelson at digium.com>
Date:   Mon Jun 6 15:00:23 2011 -0500

    Make adjustment's based on Kevin's feedback.
    
    * Add shutDown method to Queue and SuspendableQueue
    * Add shuttingDown method to QueueListener

diff --git a/AsteriskSCF/System/WorkQueue/WorkQueueIf.ice b/AsteriskSCF/System/WorkQueue/WorkQueueIf.ice
index d5ba6a3..d966295 100644
--- a/AsteriskSCF/System/WorkQueue/WorkQueueIf.ice
+++ b/AsteriskSCF/System/WorkQueue/WorkQueueIf.ice
@@ -56,6 +56,11 @@ module V1
          * Indicates that the Queue or SuspendableQueue is now empty
          */
         void emptied();
+
+        /**
+         * Indicates that the Queue or SuspendableQueue is being shut down
+         */
+        void shuttingDown();
     };
 
     /**
@@ -83,6 +88,15 @@ module V1
     };
 
     /**
+     * Exception thrown when attempting to run an operation on a Queue
+     * or SuspendableQueue that has been told to shut down.
+     * that has been told to shut down.
+     */
+    local exception ShuttingDown
+    {
+    };
+
+    /**
      * A standard work queue
      *
      * Queues maintain a thread-safe FIFO of Work
@@ -94,7 +108,7 @@ module V1
          *
          * @param item The item of Work to enqueue
          */
-        void enqueueWork(Work item);
+        void enqueueWork(Work item) throws ShuttingDown;
 
         /**
          * Enqueue multiple items of Work atomically
@@ -104,7 +118,7 @@ module V1
          *
          * @param items The sequence of Work to add to the Queue.
          */
-       	void enqueueWorkSeq(WorkSeq items);
+       	void enqueueWorkSeq(WorkSeq items) throws ShuttingDown;
 
         /**
          * Cancel a previously queued work item.
@@ -116,7 +130,7 @@ module V1
          *
          * @param item The item to be canceled
          */
-       	void cancelWork(Work item);
+       	void cancelWork(Work item) throws ShuttingDown;
 
         /**
          * Pop the front item from the queue and call its execute() method
@@ -124,7 +138,8 @@ module V1
          * @retval true The queue contains more Work to be executed
          * @retval false The queue contains no more Work objects
          */
-       	bool executeWork();
+       	bool executeWork() throws ShuttingDown;
+
         /**
          * Obtain a snapshot of the number of items in the Queue.
          *
@@ -134,7 +149,7 @@ module V1
          *
          * @return The number of Work objects in the Queue
          */
-       	long getSize();
+       	long getSize() throws ShuttingDown;
 
         /**
          * Set a new QueueListener
@@ -144,7 +159,15 @@ module V1
          *
          * @param listener The new QueueListener to set
          */
-        void setListener(QueueListener listener);
+        void setListener(QueueListener listener) throws ShuttingDown;
+
+        /**
+         * Shut a queue down
+         *
+         * Signals the queue that no further work shall be added
+         * or executed.
+         */
+        void shutDown() throws ShuttingDown;
     };
 
     /**
@@ -208,7 +231,7 @@ module V1
          *
          * @param item The item of work to enqueue
          */
-        void enqueueWork(SuspendableWork item);
+        void enqueueWork(SuspendableWork item) throws ShuttingDown;
 
         /**
          * Enqueue multiple items of SuspendableWork atomically
@@ -218,7 +241,7 @@ module V1
          *
          * @param items The sequence of SuspendableWork to enqueue
          */
-       	void enqueueWorkSeq(SuspendableWorkSeq items);
+       	void enqueueWorkSeq(SuspendableWorkSeq items) throws ShuttingDown;
 
          /**
          * Cancel a previously queued SuspendableWork item.
@@ -232,7 +255,7 @@ module V1
          *
          * @param item The item to be canceled
          */
-       	void cancelWork(SuspendableWork item) throws WorkInProgress;
+       	void cancelWork(SuspendableWork item) throws WorkInProgress, ShuttingDown;
        
         /**
          * Pop the front item from the queue and call its execute() method
@@ -242,7 +265,7 @@ module V1
          * @retval false The queue either contains no more SuspendableWork
          * items OR the item executed returned a Suspended result.
          */
-       	bool executeWork();
+       	bool executeWork() throws ShuttingDown;
 
         /**
          * Obtain a snapshot of the number of items in the SuspendableQueue.
@@ -254,7 +277,7 @@ module V1
          * @return The number of SuspendableWork objects in the
          * SuspendableQueue
          */
-       	long getSize();
+       	long getSize() throws ShuttingDown;
 
         /**
          * Set a new QueueListener
@@ -264,7 +287,15 @@ module V1
          *
          * @param listener The new QueueListener to set
          */
-        void setListener(QueueListener listener);
+        void setListener(QueueListener listener) throws ShuttingDown;
+
+        /**
+         * Shut a SuspendableQueue down.
+         * 
+         * Signals the SuspendableQueue that no further work shall be added
+         * or executed
+         */
+        void shutDown() throws ShuttingDown;
     };
 
 }; /* End of V1 */

commit 2563dc534c1c1dd977606e06baf9334b4317bd73
Merge: 6652280 bd98936
Author: Mark Michelson <mmichelson at digium.com>
Date:   Mon May 23 15:48:19 2011 -0500

    Merge branch 'master' of git.asterisk.org:asterisk-scf/release/slice


commit bd989360809bba998965c8a5a37d3f55436e7bf0
Author: Joshua Colp <jcolp at digium.com>
Date:   Mon May 23 11:43:26 2011 -0300

    Add an interface for the configuration replicator.

diff --git a/AsteriskSCF/System/Component/ConfigurationIf.ice b/AsteriskSCF/System/Component/ConfigurationIf.ice
index 4537fea..b2ecce2 100644
--- a/AsteriskSCF/System/Component/ConfigurationIf.ice
+++ b/AsteriskSCF/System/Component/ConfigurationIf.ice
@@ -175,6 +175,25 @@ module V1
        void removeConfigurationGroups(ConfigurationGroupSeq groups);
     };
 
+   /**
+    * Facet used to get a proxy to the configuration replicator from a state replicator.
+    */
+   const string ReplicatorFacet = "ConfigurationReplicator";
+
+   /**
+    * The configuration replicator interface provides the ability to register a listener
+    * that will receive any configuration pushed to the state replicator.
+    */
+   interface ConfigurationReplicator
+   {
+       /**
+        * Add a listener that will receive configuration updates.
+        *
+        * @param service A proxy to the listener.
+        */
+       void registerConfigurationService(AsteriskSCF::System::Configuration::V1::ConfigurationService *service);
+   };
+
 }; /* End of namespace V1 */
 
 }; /* End of namespace Configuration */

commit 66522803de9fbc42e49c39a45d677825da891ca9
Author: Mark Michelson <mmichelson at digium.com>
Date:   Thu May 19 19:02:13 2011 -0500

    Add the threadStart and threadStop methods.

diff --git a/AsteriskSCF/System/ThreadPool/ThreadPoolIf.ice b/AsteriskSCF/System/ThreadPool/ThreadPoolIf.ice
index e3081ec..eb500a5 100644
--- a/AsteriskSCF/System/ThreadPool/ThreadPoolIf.ice
+++ b/AsteriskSCF/System/ThreadPool/ThreadPoolIf.ice
@@ -96,6 +96,16 @@ module V1
          * @param tpool A handle to the Pool
          */
         void queueEmptied(Pool tpool);
+
+        /**
+         * Run from a new thread when it starts.
+         */
+        void threadStart();
+
+        /**
+         * Run from a thraed when it finishes.
+         */
+        void threadStop();
     };
     
     /**

commit 7d15ef019ad837e02c0380c63553981993b7fb82
Author: Mark Michelson <mmichelson at digium.com>
Date:   Mon May 9 17:58:12 2011 -0500

    Add more amd stuff.

diff --git a/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice b/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
index 7767cf7..7d53e82 100644
--- a/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
+++ b/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
@@ -300,7 +300,7 @@ module V1
          *
          * @see SessionInfo
          */
-        SessionInfo addListener(SessionListener* listener);
+        ["amd"] SessionInfo addListener(SessionListener* listener);
 
         /**
          * Request that an indication be performed on a session.
@@ -313,7 +313,7 @@ module V1
          *
          * @see IndicationException
          */
-        void indicate(Indication event) throws IndicationException;
+        ["amd"] void indicate(Indication event) throws IndicationException;
 
         /**
          * Method which retrieves a proxy to the endpoint object that created the current session.
@@ -322,7 +322,7 @@ module V1
          *
          * @see SessionEndpoint
          */
-        SessionEndpoint* getEndpoint();
+        ["amd"] SessionEndpoint* getEndpoint();
 
         /**
          * Method which retrieves information about the current session's state.
@@ -331,7 +331,7 @@ module V1
          *
          * @see SessionInfo
          */
-        SessionInfo getInfo();
+        ["amd"] SessionInfo getInfo();
 
         /**
          * Retrieve a media session instance, if available, for the current session.
@@ -341,7 +341,7 @@ module V1
          * @return An AsteriskSCF media session for the current session. May be a
          *   nil reference if the media part of the session has not been initialized.
          */
-        AsteriskSCF::Media::V1::Session* getMediaSession();
+        ["amd"] AsteriskSCF::Media::V1::Session* getMediaSession();
 
         /**
          * Removes a listener from the current list. Once removed, a listener
@@ -371,7 +371,7 @@ module V1
          *
          * @throws NotBridged if the session is not currently in a bridge.
          */
-        Bridge* getBridge() throws NotBridged;
+        ["amd"] Bridge* getBridge() throws NotBridged;
 
         /**
          * Set the Bridge for this session.
@@ -382,7 +382,7 @@ module V1
          *
          * @return A current copy of the session information.
          */
-        ["amd"]SessionInfo setBridge(Bridge* newBridge, SessionListener* listener);
+        ["amd"] SessionInfo setBridge(Bridge* newBridge, SessionListener* listener);
 
         /**
          * Removes this Session from it's associated Bridge.
@@ -391,7 +391,7 @@ module V1
          *
          * @throws NotBridged if the session is not currently in a bridge.
          */
-        void removeBridge(SessionListener* listener) throws NotBridged;
+        ["amd"] void removeBridge(SessionListener* listener) throws NotBridged;
     };
 
     /**

commit 7a93902486638e01bb3170fa4d70eb72426b807e
Author: Mark Michelson <mmichelson at digium.com>
Date:   Mon May 9 16:34:09 2011 -0500

    Make Session::setBridge use AMD

diff --git a/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice b/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
index e2629dc..7767cf7 100644
--- a/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
+++ b/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
@@ -382,7 +382,7 @@ module V1
          *
          * @return A current copy of the session information.
          */
-        SessionInfo setBridge(Bridge* newBridge, SessionListener* listener);
+        ["amd"]SessionInfo setBridge(Bridge* newBridge, SessionListener* listener);
 
         /**
          * Removes this Session from it's associated Bridge.

commit 941c14fc79f8c2e47957b2db994a9412734a49d0
Author: Joshua Colp <jcolp at digium.com>
Date:   Sun May 8 11:57:15 2011 -0300

    Add support for IPv6.

diff --git a/AsteriskSCF/Media/RTP/MediaRTPIf.ice b/AsteriskSCF/Media/RTP/MediaRTPIf.ice
index b0cee7f..8687f30 100644
--- a/AsteriskSCF/Media/RTP/MediaRTPIf.ice
+++ b/AsteriskSCF/Media/RTP/MediaRTPIf.ice
@@ -43,6 +43,11 @@ module V1
        * A sequence of formats that the RTP media service is expected to transport.
        */
       AsteriskSCF::Media::V1::FormatSeq formats;
+
+      /**
+       * Whether IPv6 is to be used or not.
+       */
+      bool ipv6 = false;
    };
 
    /**
@@ -66,6 +71,13 @@ module V1
    };
 
    /**
+    * Exception thrown when an invalid address is passed in.
+    */
+   exception InvalidAddress
+   {
+   };
+
+   /**
     * Interface to an RTP stream sink.
     */
    interface StreamSinkRTP extends AsteriskSCF::Media::V1::StreamSink
@@ -73,11 +85,13 @@ module V1
       /**
        * Method which changes the IP address and port that media will be sent to.
        *
-       * @param address A string representation of the IP address.
+       * @param address A string representation of the  address.
        *
        * @param port An integer containing the port.
+       *
+       * @throws InvalidAddress when the address passed in is invalid.
        */
-      void setRemoteDetails(string address, int port);
+      void setRemoteDetails(string address, int port) throws InvalidAddress;
 
       /**
        * Method which retrieves the remote IP address.
@@ -146,11 +160,11 @@ module V1
       /**
        * Method which creates a new RTP session and returns a proxy to it.
        *
-       * @param formats The media formats the session is expected to carry.
+       * @param params Parameters to configure the RTP session with.
        *
        * @return RTPSession* A proxy to the new RTP session.
        */
-      RTPSession* allocate(AsteriskSCF::Media::V1::FormatSeq formats);
+      RTPSession* allocate(RTPServiceLocatorParams params);
    };
 
 }; /*  end module V1 */

-----------------------------------------------------------------------


-- 
asterisk-scf/integration/slice.git



More information about the asterisk-scf-commits mailing list