activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1412217 - in /activemq/activemq-cpp/trunk/activemq-cpp/src/main: activemq/commands/ActiveMQDestination.cpp activemq/commands/ConsumerInfo.cpp decaf/util/concurrent/Executors.cpp decaf/util/concurrent/LinkedBlockingQueue.h
Date Wed, 21 Nov 2012 18:08:46 GMT
Author: tabish
Date: Wed Nov 21 18:08:45 2012
New Revision: 1412217

URL: http://svn.apache.org/viewvc?rev=1412217&view=rev
Log:
Fix a bunch of compiler warnings

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQDestination.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConsumerInfo.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/Executors.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/LinkedBlockingQueue.h

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQDestination.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQDestination.cpp?rev=1412217&r1=1412216&r2=1412217&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQDestination.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQDestination.cpp
Wed Nov 21 18:08:45 2012
@@ -70,13 +70,15 @@ namespace {
 
 ////////////////////////////////////////////////////////////////////////////////
 ActiveMQDestination::ActiveMQDestination() :
-    BaseDataStructure(), exclusive(false), ordered(false), advisory(false), orderedTarget(DEFAULT_ORDERED_TARGET),
physicalName(), options() {
+    BaseDataStructure(), exclusive(false), ordered(false), advisory(false), compositeDestinations(),
+    orderedTarget(DEFAULT_ORDERED_TARGET), physicalName(), options() {
 
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 ActiveMQDestination::ActiveMQDestination(const std::string& physicalName) :
-    BaseDataStructure(), exclusive(false), ordered(false), advisory(false), orderedTarget(DEFAULT_ORDERED_TARGET),
physicalName(), options() {
+    BaseDataStructure(), exclusive(false), ordered(false), advisory(false), compositeDestinations(),
+    orderedTarget(DEFAULT_ORDERED_TARGET), physicalName(), options() {
 
     this->setPhysicalName(physicalName);
 }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConsumerInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConsumerInfo.cpp?rev=1412217&r1=1412216&r2=1412217&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConsumerInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConsumerInfo.cpp Wed
Nov 21 18:08:45 2012
@@ -38,10 +38,10 @@ using namespace decaf::lang::exceptions;
  */
 
 ////////////////////////////////////////////////////////////////////////////////
-ConsumerInfo::ConsumerInfo() 
-    : BaseCommand(), consumerId(NULL), browser(false), destination(NULL), prefetchSize(0),
maximumPendingMessageLimit(0), dispatchAsync(false), 
-      selector(""), subscriptionName(""), noLocal(false), exclusive(false), retroactive(false),
priority(0), brokerPath(), 
-      additionalPredicate(NULL), networkSubscription(false), optimizedAcknowledge(false),
noRangeAcks(false), networkConsumerPath() {
+ConsumerInfo::ConsumerInfo()
+    : BaseCommand(), consumerId(NULL), browser(false), destination(NULL), prefetchSize(0),
maximumPendingMessageLimit(0), dispatchAsync(false),
+      selector(""), subscriptionName(""), noLocal(false), exclusive(false), retroactive(false),
priority(0), brokerPath(),
+      additionalPredicate(NULL), networkSubscription(false), optimizedAcknowledge(false),
noRangeAcks(false), networkConsumerPath(), currentPrefetchSize(0) {
 
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/Executors.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/Executors.cpp?rev=1412217&r1=1412216&r2=1412217&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/Executors.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/Executors.cpp
Wed Nov 21 18:08:45 2012
@@ -49,6 +49,11 @@ namespace {
         AtomicInteger threadNumber;
         std::string namePrefix;
 
+    private:
+
+        DefaultThreadFactory(const DefaultThreadFactory&);
+        DefaultThreadFactory& operator= (const DefaultThreadFactory&);
+
     public:
 
         DefaultThreadFactory() : ThreadFactory(), threadNumber(1), namePrefix() {
@@ -78,6 +83,11 @@ namespace {
 
         ExecutorService* service;
 
+    private:
+
+        NonConfigurableExecutorService(const NonConfigurableExecutorService&);
+        NonConfigurableExecutorService& operator= (const NonConfigurableExecutorService&);
+
     public:
 
         NonConfigurableExecutorService(ExecutorService* service) : AbstractExecutorService(),
service(service) {

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/LinkedBlockingQueue.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/LinkedBlockingQueue.h?rev=1412217&r1=1412216&r2=1412217&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/LinkedBlockingQueue.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/LinkedBlockingQueue.h
Wed Nov 21 18:08:45 2012
@@ -226,6 +226,48 @@ namespace concurrent {
             DECAF_CATCHALL_THROW(decaf::lang::Exception)
         }
 
+        /**
+         * Create a new instance with a Capacity of Integer::MAX_VALUE and adds all the
+         * values contained in the specified LinkedBlockingQueue to this Queue.
+         *
+         * @param queue
+         *      The LinkedBlockingQueue whose elements are to be copied to this Queue.
+         *
+         * @throws IllegalStateException if the number of elements in the collection exceeds
+         *         this Queue's capacity.
+         */
+        LinkedBlockingQueue(const LinkedBlockingQueue& queue) : BlockingQueue<E>(),
+                                                                capacity(lang::Integer::MAX_VALUE),
count(),
+                                                                takeLock(), notEmpty(), putLock(),
notFull(),
+                                                                head(new QueueNode<E>()),
tail() {
+
+            this->tail = this->head;
+            this->notEmpty.reset(this->takeLock.newCondition());
+            this->notFull.reset(this->putLock.newCondition());
+
+            Pointer< Iterator<E> > iter(queue.iterator);
+
+            try {
+
+                int count = 0;
+
+                while(iter->hasNext()) {
+                    if(count == this->capacity) {
+                        throw decaf::lang::exceptions::IllegalStateException( __FILE__, __LINE__,
+                            "Number of elements in the Collection exceeds this Queue's Capacity.");
+                    }
+
+                    this->enqueue(iter->next());
+                    ++count;
+                }
+
+                this->count.set(count);
+            }
+            DECAF_CATCH_RETHROW(decaf::lang::exceptions::IllegalStateException)
+            DECAF_CATCH_RETHROW(decaf::lang::Exception)
+            DECAF_CATCHALL_THROW(decaf::lang::Exception)
+        }
+
         virtual ~LinkedBlockingQueue() {
             try{
                 this->purgeList();
@@ -623,6 +665,11 @@ namespace concurrent {
             E currentElement;
             LinkedBlockingQueue<E>* parent;
 
+        private:
+
+            LinkedIterator(const LinkedIterator&);
+            LinkedIterator& operator= (const LinkedIterator&);
+
         public:
 
             LinkedIterator(LinkedBlockingQueue<E>* parent) : current(), last(),
@@ -712,6 +759,11 @@ namespace concurrent {
             E currentElement;
             const LinkedBlockingQueue<E>* parent;
 
+        private:
+
+            ConstLinkedIterator(const ConstLinkedIterator&);
+            ConstLinkedIterator& operator= (const ConstLinkedIterator&);
+
         public:
 
             ConstLinkedIterator(const LinkedBlockingQueue<E>* parent) : current(),
last(),



Mime
View raw message