diff options
Diffstat (limited to 'cpp/src/qpid/broker/DtxBuffer.h')
| -rw-r--r-- | cpp/src/qpid/broker/DtxBuffer.h | 53 |
1 files changed, 28 insertions, 25 deletions
diff --git a/cpp/src/qpid/broker/DtxBuffer.h b/cpp/src/qpid/broker/DtxBuffer.h index 1511cb032f..cabd37647a 100644 --- a/cpp/src/qpid/broker/DtxBuffer.h +++ b/cpp/src/qpid/broker/DtxBuffer.h @@ -7,9 +7,9 @@ * 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 @@ -26,31 +26,34 @@ #include "qpid/sys/Mutex.h" namespace qpid { - namespace broker { - class DtxBuffer : public TxBuffer{ - sys::Mutex lock; - const std::string xid; - bool ended; - bool suspended; - bool failed; - bool expired; +namespace broker { +class DtxBuffer : public TxBuffer{ + mutable sys::Mutex lock; + const std::string xid; + bool ended; + bool suspended; + bool failed; + bool expired; - public: - typedef boost::shared_ptr<DtxBuffer> shared_ptr; + public: + typedef boost::shared_ptr<DtxBuffer> shared_ptr; - QPID_BROKER_EXTERN DtxBuffer(const std::string& xid = ""); - QPID_BROKER_EXTERN ~DtxBuffer(); - QPID_BROKER_EXTERN void markEnded(); - bool isEnded(); - void setSuspended(bool suspended); - bool isSuspended(); - void fail(); - bool isRollbackOnly(); - void timedout(); - bool isExpired(); - const std::string& getXid(); - }; - } + QPID_BROKER_EXTERN DtxBuffer( + const std::string& xid = "", + bool ended=false, bool suspended=false, bool failed=false, bool expired=false); + QPID_BROKER_EXTERN ~DtxBuffer(); + QPID_BROKER_EXTERN void markEnded(); + bool isEnded() const; + void setSuspended(bool suspended); + bool isSuspended() const; + void fail(); + bool isRollbackOnly() const; + void timedout(); + bool isExpired() const; + bool isFailed() const; + std::string getXid() const; +}; +} } |
