diff options
| author | Gordon Sim <gsim@apache.org> | 2007-09-14 14:09:08 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2007-09-14 14:09:08 +0000 |
| commit | 9b3748849707c476b76c09fcabfefd965087a108 (patch) | |
| tree | f0d41cf4feb25f36e9a1e33065175b09f18ba3ec /cpp/src/qpid/broker/IncomingExecutionContext.h | |
| parent | e10d11937bccc3cdbdd867266501c3e16d28e933 (diff) | |
| download | qpid-python-9b3748849707c476b76c09fcabfefd965087a108.tar.gz | |
Handle asynchronous enqueue of messages.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@575689 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/IncomingExecutionContext.h')
| -rw-r--r-- | cpp/src/qpid/broker/IncomingExecutionContext.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/cpp/src/qpid/broker/IncomingExecutionContext.h b/cpp/src/qpid/broker/IncomingExecutionContext.h new file mode 100644 index 0000000000..1e4a394be6 --- /dev/null +++ b/cpp/src/qpid/broker/IncomingExecutionContext.h @@ -0,0 +1,58 @@ +/* + * + * 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. + * + */ +#ifndef _IncomingExecutionContext_ +#define _IncomingExecutionContext_ + +#include "qpid/framing/AccumulatedAck.h" +#include "qpid/framing/SequenceNumber.h" +#include "Message.h" + +namespace qpid { +namespace broker { + +class IncomingExecutionContext +{ + typedef std::list<Message::shared_ptr> Messages; + framing::Window window; + framing::AccumulatedAck completed; + Messages incomplete; + + bool isComplete(const framing::SequenceNumber& command); + void check(); + void wait(); +public: + void noop(); + void flush(); + void sync(); + void sync(const framing::SequenceNumber& point); + framing::SequenceNumber next(); + void complete(const framing::SequenceNumber& command); + void track(Message::shared_ptr); + + const framing::SequenceNumber& getMark(); + framing::SequenceNumberSet getRange(); + +}; + + +}} + +#endif |
