activemq-cpp-3.9.5
ConnectionStateTracker.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_STATE_CONNECTIONSTATETRACKER_H_
19#define _ACTIVEMQ_STATE_CONNECTIONSTATETRACKER_H_
20
32
33#include <decaf/lang/Pointer.h>
34
35namespace activemq {
36namespace state {
37
38 class RemoveTransactionAction;
39 class StateTrackerImpl;
40
42 private:
43
44 StateTrackerImpl* impl;
45
46 bool trackTransactions;
47 bool restoreSessions;
48 bool restoreConsumers;
49 bool restoreProducers;
50 bool restoreTransaction;
51 bool trackMessages;
52 bool trackTransactionProducers;
53 int maxMessageCacheSize;
54 int maxMessagePullCacheSize;
55
57
58 public:
59
61
63
65
67
69
72
74
76
78
80
82
84
86
88
90
92
94
96
98
100
102
104
106
108
110
111 bool isRestoreConsumers() const {
112 return this->restoreConsumers;
113 }
114
115 void setRestoreConsumers(bool restoreConsumers) {
116 this->restoreConsumers = restoreConsumers;
117 }
118
119 bool isRestoreProducers() const {
120 return this->restoreProducers;
121 }
122
123 void setRestoreProducers(bool restoreProducers) {
124 this->restoreProducers = restoreProducers;
125 }
126
127 bool isRestoreSessions() const {
128 return this->restoreSessions;
129 }
130
131 void setRestoreSessions(bool restoreSessions) {
132 this->restoreSessions = restoreSessions;
133 }
134
135 bool isTrackTransactions() const {
136 return this->trackTransactions;
137 }
138
139 void setTrackTransactions(bool trackTransactions) {
140 this->trackTransactions = trackTransactions;
141 }
142
143 bool isRestoreTransaction() const {
144 return this->restoreTransaction;
145 }
146
147 void setRestoreTransaction(bool restoreTransaction) {
148 this->restoreTransaction = restoreTransaction;
149 }
150
151 bool isTrackMessages() const {
152 return this->trackMessages;
153 }
154
155 void setTrackMessages(bool trackMessages) {
156 this->trackMessages = trackMessages;
157 }
158
160 return this->maxMessageCacheSize;
161 }
162
163 void setMaxMessageCacheSize(int maxMessageCacheSize) {
164 this->maxMessageCacheSize = maxMessageCacheSize;
165 }
166
168 return this->maxMessagePullCacheSize;
169 }
170
171 void setMaxMessagePullCacheSize(int maxMessagePullCacheSize) {
172 this->maxMessagePullCacheSize = maxMessagePullCacheSize;
173 }
174
176 return this->trackTransactionProducers;
177 }
178
179 void setTrackTransactionProducers(bool trackTransactionProducers) {
180 this->trackTransactionProducers = trackTransactionProducers;
181 }
182
183 private:
184
185 void doRestoreTransactions(decaf::lang::Pointer<transport::Transport> transport,
187
190
193
196
197 void doRestoreTempDestinations(decaf::lang::Pointer<transport::Transport> transport,
199
200 };
201
202}}
203
204#endif /*_ACTIVEMQ_STATE_CONNECTIONSTATETRACKER_H_*/
#define AMQCPP_API
Definition Config.h:30
Definition ConnectionId.h:51
Definition ConnectionInfo.h:49
Definition ConsumerId.h:48
Definition ConsumerInfo.h:51
Definition DestinationInfo.h:49
Definition Message.h:59
Definition MessagePull.h:49
Definition ProducerId.h:48
Definition ProducerInfo.h:50
Definition SessionId.h:51
Definition SessionInfo.h:48
Definition TransactionInfo.h:48
Default Implementation of a CommandVisitor that returns NULL for all calls.
Definition CommandVisitorAdapter.h:66
int getMaxMessageCacheSize() const
Definition ConnectionStateTracker.h:159
virtual decaf::lang::Pointer< Command > processEndTransaction(TransactionInfo *info)
virtual decaf::lang::Pointer< Command > processDestinationInfo(DestinationInfo *info)
friend class RemoveTransactionAction
Definition ConnectionStateTracker.h:56
void setTrackMessages(bool trackMessages)
Definition ConnectionStateTracker.h:155
virtual decaf::lang::Pointer< Command > processRemoveSession(SessionId *id)
virtual decaf::lang::Pointer< Command > processRollbackTransaction(TransactionInfo *info)
void setMaxMessagePullCacheSize(int maxMessagePullCacheSize)
Definition ConnectionStateTracker.h:171
bool isRestoreSessions() const
Definition ConnectionStateTracker.h:127
void setTrackTransactions(bool trackTransactions)
Definition ConnectionStateTracker.h:139
bool isTrackTransactionProducers() const
Definition ConnectionStateTracker.h:175
virtual decaf::lang::Pointer< Command > processRemoveProducer(ProducerId *id)
virtual decaf::lang::Pointer< Command > processPrepareTransaction(TransactionInfo *info)
virtual decaf::lang::Pointer< Command > processConsumerInfo(ConsumerInfo *info)
void restore(decaf::lang::Pointer< transport::Transport > transport)
void setRestoreSessions(bool restoreSessions)
Definition ConnectionStateTracker.h:131
virtual decaf::lang::Pointer< Command > processSessionInfo(SessionInfo *info)
virtual decaf::lang::Pointer< Command > processRemoveDestination(DestinationInfo *info)
virtual decaf::lang::Pointer< Command > processBeginTransaction(TransactionInfo *info)
void setMaxMessageCacheSize(int maxMessageCacheSize)
Definition ConnectionStateTracker.h:163
bool isTrackTransactions() const
Definition ConnectionStateTracker.h:135
virtual decaf::lang::Pointer< Command > processProducerInfo(ProducerInfo *info)
void trackBack(decaf::lang::Pointer< Command > command)
void setRestoreTransaction(bool restoreTransaction)
Definition ConnectionStateTracker.h:147
bool isRestoreTransaction() const
Definition ConnectionStateTracker.h:143
void setRestoreProducers(bool restoreProducers)
Definition ConnectionStateTracker.h:123
virtual decaf::lang::Pointer< Command > processCommitTransactionTwoPhase(TransactionInfo *info)
virtual decaf::lang::Pointer< Command > processRemoveConsumer(ConsumerId *id)
virtual decaf::lang::Pointer< Command > processMessage(Message *message)
int getMaxMessagePullCacheSize() const
Definition ConnectionStateTracker.h:167
bool isTrackMessages() const
Definition ConnectionStateTracker.h:151
void setRestoreConsumers(bool restoreConsumers)
Definition ConnectionStateTracker.h:115
virtual decaf::lang::Pointer< Command > processRemoveConnection(ConnectionId *id)
Pointer< Tracked > track(Pointer< Command > command)
bool isRestoreConsumers() const
Definition ConnectionStateTracker.h:111
virtual decaf::lang::Pointer< Command > processCommitTransactionOnePhase(TransactionInfo *info)
void connectionInterruptProcessingComplete(transport::Transport *transport, decaf::lang::Pointer< ConnectionId > connectionId)
virtual decaf::lang::Pointer< Command > processMessagePull(MessagePull *pull)
bool isRestoreProducers() const
Definition ConnectionStateTracker.h:119
void setTrackTransactionProducers(bool trackTransactionProducers)
Definition ConnectionStateTracker.h:179
virtual decaf::lang::Pointer< Command > processConnectionInfo(ConnectionInfo *info)
Interface for a transport layer for command objects.
Definition Transport.h:60
Decaf's implementation of a Smart Pointer that is a template on a Type and is Thread Safe if the defa...
Definition Pointer.h:53
Definition Command.h:28
Definition AbstractTransportFactory.h:30
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition CachedConsumer.h:24