[asterisk-scf-commits] asterisk-scf/release/slice.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Fri Jun 24 16:29:53 CDT 2011


branch "master" has been updated
       via  c1445edc298ff6e9364422138a4d8b44263bcc84 (commit)
       via  e9b2b78a7a003410aa78df5e85a161b40f83c30f (commit)
       via  e3ec1c045fcd9198a1460ed15113b4d5c09ab813 (commit)
       via  f6073fff0cdda2017d9cb15fe137e53bb595f444 (commit)
       via  aa3d3e031f0e4d824532b9b91b506cf8513ad880 (commit)
      from  8686e1c58347265169e6a9e9c2ae2aa696caa308 (commit)

Summary of changes:
 slice/AsteriskSCF/System/WorkQueue/WorkQueueIf.ice |  144 ++++++++++----------
 1 files changed, 70 insertions(+), 74 deletions(-)


- Log -----------------------------------------------------------------
commit c1445edc298ff6e9364422138a4d8b44263bcc84
Merge: e9b2b78 8686e1c
Author: Mark Michelson <mmichelson at digium.com>
Date:   Fri Jun 24 16:29:49 2011 -0500

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


commit e9b2b78a7a003410aa78df5e85a161b40f83c30f
Merge: 6786e05 e3ec1c0
Author: Mark Michelson <mmichelson at digium.com>
Date:   Fri Jun 24 16:29:07 2011 -0500

    Merge branch 'queue-shutdown'


commit e3ec1c045fcd9198a1460ed15113b4d5c09ab813
Author: Mark Michelson <mmichelson at digium.com>
Date:   Fri Jun 24 16:23:00 2011 -0500

    Change shutDown to shutdown

diff --git a/AsteriskSCF/System/WorkQueue/WorkQueueIf.ice b/AsteriskSCF/System/WorkQueue/WorkQueueIf.ice
index 7de0cb4..72ed1b9 100644
--- a/AsteriskSCF/System/WorkQueue/WorkQueueIf.ice
+++ b/AsteriskSCF/System/WorkQueue/WorkQueueIf.ice
@@ -109,7 +109,7 @@ module V1
          * Signals the queue that no further work shall be added
          * or executed.
          */
-        void shutDown() throws ShuttingDown;
+        void shutdown() throws ShuttingDown;
     };
 
     /**

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 */

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


-- 
asterisk-scf/release/slice.git



More information about the asterisk-scf-commits mailing list