/usr/share/cruisecontrol-bin-2.6.1/projects/qpid-trunk/cpp/src/qpid/broker/NullMessageStore.h

00001 /*
00002  *
00003  * Licensed to the Apache Software Foundation (ASF) under one
00004  * or more contributor license agreements.  See the NOTICE file
00005  * distributed with this work for additional information
00006  * regarding copyright ownership.  The ASF licenses this file
00007  * to you under the Apache License, Version 2.0 (the
00008  * "License"); you may not use this file except in compliance
00009  * with the License.  You may obtain a copy of the License at
00010  * 
00011  *   http://www.apache.org/licenses/LICENSE-2.0
00012  * 
00013  * Unless required by applicable law or agreed to in writing,
00014  * software distributed under the License is distributed on an
00015  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00016  * KIND, either express or implied.  See the License for the
00017  * specific language governing permissions and limitations
00018  * under the License.
00019  *
00020  */
00021 #ifndef _NullMessageStore_
00022 #define _NullMessageStore_
00023 
00024 #include <set>
00025 #include "MessageStore.h"
00026 #include "Queue.h"
00027 
00028 #include <boost/intrusive_ptr.hpp>
00029 
00030 namespace qpid {
00031 namespace broker {
00032 
00036 class NullMessageStore : public MessageStore
00037 {
00038     std::set<std::string> prepared;
00039     const bool warn;
00040 public:
00041     NullMessageStore(bool warn = false);
00042 
00043     virtual bool init(const Options* options);
00044     virtual std::auto_ptr<TransactionContext> begin();
00045     virtual std::auto_ptr<TPCTransactionContext> begin(const std::string& xid);
00046     virtual void prepare(TPCTransactionContext& txn);
00047     virtual void commit(TransactionContext& txn);
00048     virtual void abort(TransactionContext& txn);
00049     virtual void collectPreparedXids(std::set<std::string>& xids);
00050 
00051     virtual void create(PersistableQueue& queue, const framing::FieldTable& args);
00052     virtual void destroy(PersistableQueue& queue);
00053     virtual void create(const PersistableExchange& exchange, const framing::FieldTable& args);
00054     virtual void destroy(const PersistableExchange& exchange);
00055 
00056     virtual void bind(const PersistableExchange& exchange, const PersistableQueue& queue, 
00057                       const std::string& key, const framing::FieldTable& args);
00058     virtual void unbind(const PersistableExchange& exchange, const PersistableQueue& queue, 
00059                         const std::string& key, const framing::FieldTable& args);
00060     virtual void recover(RecoveryManager& queues);
00061     virtual void stage(boost::intrusive_ptr<PersistableMessage>& msg);
00062     virtual void destroy(PersistableMessage& msg);
00063     virtual void appendContent(boost::intrusive_ptr<const PersistableMessage>& msg,
00064                                const std::string& data);
00065     virtual void loadContent(const qpid::broker::PersistableQueue& queue,
00066                              boost::intrusive_ptr<const PersistableMessage>& msg, std::string& data,
00067                              uint64_t offset, uint32_t length);
00068     virtual void enqueue(TransactionContext* ctxt, boost::intrusive_ptr<PersistableMessage>& msg,
00069                          const PersistableQueue& queue);
00070     virtual void dequeue(TransactionContext* ctxt, boost::intrusive_ptr<PersistableMessage>& msg,
00071                          const PersistableQueue& queue);
00072     virtual u_int32_t outstandingQueueAIO(const PersistableQueue& queue);
00073     virtual void flush(const qpid::broker::PersistableQueue& queue);
00074     ~NullMessageStore(){}
00075 };
00076 
00077 }
00078 }
00079 
00080 
00081 #endif

Generated on Thu Apr 10 11:08:17 2008 for Qpid by  doxygen 1.4.7