18#ifndef _ACTIVEMQ_CORE_SIMPLEPRIORITYMESSAGEDISPATCHCHANNEL_H_
19#define _ACTIVEMQ_CORE_SIMPLEPRIORITYMESSAGEDISPATCHCHANNEL_H_
31 using decaf::lang::ArrayPointer;
36 static const int MAX_PRIORITIES;
49 SimplePriorityMessageDispatchChannel(
const SimplePriorityMessageDispatchChannel&);
50 SimplePriorityMessageDispatchChannel& operator=(
const SimplePriorityMessageDispatchChannel&);
87 virtual std::vector<Pointer<MessageDispatch> >
removeAll();
96 return mutex.tryLock();
107 virtual void wait(
long long millisecs) {
108 mutex.wait(millisecs);
111 virtual void wait(
long long millisecs,
int nanos) {
112 mutex.wait(millisecs, nanos);
#define AMQCPP_API
Definition Config.h:30
Definition MessageDispatchChannel.h:34
virtual void notifyAll()
Signals the waiters on this object that it can now wake up and continue.
Definition SimplePriorityMessageDispatchChannel.h:119
virtual std::vector< Pointer< MessageDispatch > > removeAll()
Remove all messages that are currently in the Channel and return them as a list of Messages.
virtual void lock()
Locks the object.
Definition SimplePriorityMessageDispatchChannel.h:91
virtual void clear()
Clear the Channel, all pending messages are removed.
virtual bool isClosed() const
Definition SimplePriorityMessageDispatchChannel.h:63
virtual void unlock()
Unlocks the object.
Definition SimplePriorityMessageDispatchChannel.h:99
virtual bool isEmpty() const
virtual void enqueueFirst(const Pointer< MessageDispatch > &message)
Add a message to the front of the Channel.
virtual void start()
Starts dispatch of messages from the Channel.
virtual Pointer< MessageDispatch > dequeueNoWait()
Used to get an enqueued message if there is one queued right now.
virtual void wait(long long millisecs)
Waits on a signal from this object, which is generated by a call to Notify.
Definition SimplePriorityMessageDispatchChannel.h:107
SimplePriorityMessageDispatchChannel()
virtual ~SimplePriorityMessageDispatchChannel()
virtual void notify()
Signals a waiter on this object that it can now wake up and continue.
Definition SimplePriorityMessageDispatchChannel.h:115
virtual void stop()
Stops dispatch of message from the Channel.
virtual bool tryLock()
Attempts to Lock the object, if the lock is already held by another thread than this method returns f...
Definition SimplePriorityMessageDispatchChannel.h:95
virtual void wait(long long millisecs, int nanos)
Waits on a signal from this object, which is generated by a call to Notify.
Definition SimplePriorityMessageDispatchChannel.h:111
virtual void close()
Close this channel no messages will be dispatched after this method is called.
virtual void wait()
Waits on a signal from this object, which is generated by a call to Notify.
Definition SimplePriorityMessageDispatchChannel.h:103
virtual Pointer< MessageDispatch > dequeue(long long timeout)
Used to get an enqueued message.
virtual Pointer< MessageDispatch > peek() const
Peek in the Queue and return the first message in the Channel without removing it from the channel.
virtual void enqueue(const Pointer< MessageDispatch > &message)
Add a Message to the Channel behind all pending message.
virtual bool isRunning() const
Definition SimplePriorityMessageDispatchChannel.h:67
Decaf's implementation of a Smart Pointer that is a template on a Type and is Thread Safe if the defa...
Definition ArrayPointer.h:51
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
A complete implementation of the List interface using a doubly linked list data structure.
Definition LinkedList.h:55
Mutex object that offers recursive support on all platforms as well as providing the ability to use t...
Definition Mutex.h:39
Definition ActiveMQTempDestination.h:29
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition CachedConsumer.h:24