activemq-cpp-3.8.2
ConnectionAudit.h
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef _ACTIVEMQ_CORE_CONNECTIONAUDIT_H_
19 #define _ACTIVEMQ_CORE_CONNECTIONAUDIT_H_
20 
21 #include <activemq/util/Config.h>
22 
24 #include <decaf/lang/Pointer.h>
25 
26 namespace activemq {
27 namespace core {
28 
29  class ConnectionAuditImpl;
30  class Dispatcher;
31 
39  private:
40 
42  ConnectionAudit& operator= (const ConnectionAudit&);
43 
44  private:
45 
46  ConnectionAuditImpl* impl;
47 
48  bool checkForDuplicates;
49  int auditDepth;
50  int auditMaximumProducerNumber;
51 
52  public:
53 
55 
56  ConnectionAudit(int auditDepth, int maxProducers);
57 
58  ~ConnectionAudit();
59 
60  public:
61 
62  void removeDispatcher(Dispatcher* dispatcher);
63 
64  bool isDuplicate(Dispatcher* dispatcher, decaf::lang::Pointer<commands::Message> message);
65 
66  void rollbackDuplicate(Dispatcher* dispatcher, decaf::lang::Pointer<commands::Message> message);
67 
68  public:
69 
70  bool isCheckForDuplicates() const {
71  return this->checkForDuplicates;
72  }
73 
74  void setCheckForDuplicates(bool checkForDuplicates) {
75  this->checkForDuplicates = checkForDuplicates;
76  }
77 
78  int getAuditDepth() {
79  return auditDepth;
80  }
81 
82  void setAuditDepth(int auditDepth) {
83  this->auditDepth = auditDepth;
84  }
85 
87  return auditMaximumProducerNumber;
88  }
89 
90  void setAuditMaximumProducerNumber(int auditMaximumProducerNumber) {
91  this->auditMaximumProducerNumber = auditMaximumProducerNumber;
92  }
93 
94  };
95 
96 }}
97 
98 #endif /* _ACTIVEMQ_CORE_CONNECTIONAUDIT_H_ */
int getAuditDepth()
Definition: ConnectionAudit.h:78
#define AMQCPP_API
Definition: Config.h:30
void setAuditDepth(int auditDepth)
Definition: ConnectionAudit.h:82
Provides the Auditing functionality used by Connections to attempt to filter out duplicate Messages...
Definition: ConnectionAudit.h:38
bool isCheckForDuplicates() const
Definition: ConnectionAudit.h:70
void setAuditMaximumProducerNumber(int auditMaximumProducerNumber)
Definition: ConnectionAudit.h:90
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements...
Definition: CachedConsumer.h:24
Interface for an object responsible for dispatching messages to consumers.
Definition: Dispatcher.h:32
int getAuditMaximumProducerNumber()
Definition: ConnectionAudit.h:86
Decaf&#39;s implementation of a Smart Pointer that is a template on a Type and is Thread Safe if the defa...
Definition: Pointer.h:53
void setCheckForDuplicates(bool checkForDuplicates)
Definition: ConnectionAudit.h:74