qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject svn commit: r1070944 - in /qpid/trunk/qpid/cpp/src/qpid/broker: QueueObserver.h ThresholdAlerts.h
Date Tue, 15 Feb 2011 15:45:59 GMT
Author: gsim
Date: Tue Feb 15 15:45:59 2011
New Revision: 1070944

URL: http://svn.apache.org/viewvc?rev=1070944&view=rev
Log:
QPID-3002: Added virtual destructor for new interface; Removed some more accidentally duplicated
code.

Modified:
    qpid/trunk/qpid/cpp/src/qpid/broker/QueueObserver.h
    qpid/trunk/qpid/cpp/src/qpid/broker/ThresholdAlerts.h

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/QueueObserver.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/QueueObserver.h?rev=1070944&r1=1070943&r2=1070944&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/QueueObserver.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/QueueObserver.h Tue Feb 15 15:45:59 2011
@@ -32,47 +32,7 @@ class QueuedMessage;
 class QueueObserver
 {
   public:
-    virtual void enqueued(const QueuedMessage&) = 0;
-    virtual void dequeued(const QueuedMessage&) = 0;
-  private:
-};
-}} // namespace qpid::broker
-
-#endif  /*!QPID_BROKER_QUEUEOBSERVER_H*/
-#ifndef QPID_BROKER_QUEUEOBSERVER_H
-#define QPID_BROKER_QUEUEOBSERVER_H
-
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace qpid {
-namespace broker {
-
-class QueuedMessage;
-/**
- * Interface for notifying classes who want to act as 'observers' of a
- * queue of particular events.
- */
-class QueueObserver
-{
-  public:
+    virtual ~QueueObserver() {}
     virtual void enqueued(const QueuedMessage&) = 0;
     virtual void dequeued(const QueuedMessage&) = 0;
   private:

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/ThresholdAlerts.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/ThresholdAlerts.h?rev=1070944&r1=1070943&r2=1070944&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/ThresholdAlerts.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/ThresholdAlerts.h Tue Feb 15 15:45:59 2011
@@ -71,76 +71,3 @@ class ThresholdAlerts : public QueueObse
 }} // namespace qpid::broker
 
 #endif  /*!QPID_BROKER_THRESHOLDALERTS_H*/
-#ifndef QPID_BROKER_THRESHOLDALERTS_H
-#define QPID_BROKER_THRESHOLDALERTS_H
-
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-#include "qpid/broker/QueueObserver.h"
-#include "qpid/sys/Time.h"
-#include "qpid/types/Variant.h"
-#include <string>
-
-namespace qpid {
-namespace framing {
-class FieldTable;
-}
-namespace management {
-class ManagementAgent;
-}
-namespace broker {
-
-class Queue;
-/**
- * Class to manage generation of QMF alerts when particular thresholds
- * are breached on a queue.
- */
-class ThresholdAlerts : public QueueObserver
-{
-  public:
-    ThresholdAlerts(const std::string& name,
-                    qpid::management::ManagementAgent& agent,
-                    const uint32_t countThreshold,
-                    const uint64_t sizeThreshold,
-                    const long repeatInterval);
-    void enqueued(const QueuedMessage&);
-    void dequeued(const QueuedMessage&);
-    static void observe(Queue& queue, qpid::management::ManagementAgent& agent,
-                        const uint64_t countThreshold,
-                        const uint64_t sizeThreshold,
-                        const long repeatInterval);
-    static void observe(Queue& queue, qpid::management::ManagementAgent& agent,
-                        const qpid::framing::FieldTable& settings);
-    static void observe(Queue& queue, qpid::management::ManagementAgent& agent,
-                        const qpid::types::Variant::Map& settings);
-  private:
-    const std::string name;
-    qpid::management::ManagementAgent& agent;
-    const uint32_t countThreshold;
-    const uint64_t sizeThreshold;
-    const qpid::sys::Duration repeatInterval;
-    uint64_t count;
-    uint64_t size;
-    qpid::sys::AbsTime lastAlert;
-};
-}} // namespace qpid::broker
-
-#endif  /*!QPID_BROKER_THRESHOLDALERTS_H*/



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message