activemq-cpp-3.6.0
|
#include <src/main/activemq/core/SimplePriorityMessageDispatchChannel.h>
Public Member Functions | |
SimplePriorityMessageDispatchChannel () | |
virtual | ~SimplePriorityMessageDispatchChannel () |
virtual void | enqueue (const Pointer< MessageDispatch > &message) |
Add a Message to the Channel behind all pending message. | |
virtual void | enqueueFirst (const Pointer< MessageDispatch > &message) |
Add a message to the front of the Channel. | |
virtual bool | isEmpty () const |
virtual bool | isClosed () const |
virtual bool | isRunning () const |
virtual Pointer< MessageDispatch > | dequeue (long long timeout) |
Used to get an enqueued message. | |
virtual Pointer< MessageDispatch > | dequeueNoWait () |
Used to get an enqueued message if there is one queued right now. | |
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 | start () |
Starts dispatch of messages from the Channel. | |
virtual void | stop () |
Stops dispatch of message from the Channel. | |
virtual void | close () |
Close this channel no messages will be dispatched after this method is called. | |
virtual void | clear () |
Clear the Channel, all pending messages are removed. | |
virtual int | size () const |
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. | |
virtual bool | tryLock () |
Attempts to Lock the object, if the lock is already held by another thread than this method returns false. | |
virtual void | unlock () |
Unlocks the object. | |
virtual void | wait () |
Waits on a signal from this object, which is generated by a call to Notify. | |
virtual void | wait (long long millisecs) |
Waits on a signal from this object, which is generated by a call to Notify. | |
virtual void | wait (long long millisecs, int nanos) |
Waits on a signal from this object, which is generated by a call to Notify. | |
virtual void | notify () |
Signals a waiter on this object that it can now wake up and continue. | |
virtual void | notifyAll () |
Signals the waiters on this object that it can now wake up and continue. | |
Public Member Functions inherited from decaf::util::concurrent::Synchronizable | |
virtual | ~Synchronizable () |
activemq::core::SimplePriorityMessageDispatchChannel::SimplePriorityMessageDispatchChannel | ( | ) |
|
virtual |
|
virtual |
Clear the Channel, all pending messages are removed.
Implements activemq::core::MessageDispatchChannel.
|
virtual |
Close this channel no messages will be dispatched after this method is called.
Implements activemq::core::MessageDispatchChannel.
|
virtual |
Used to get an enqueued message.
The amount of time this method blocks is based on the timeout value. - if timeout==-1 then it blocks until a message is received. - if timeout==0 then it it tries to not block at all, it returns a message if it is available - if timeout>0 then it blocks up to timeout amount of time. Expired messages will consumed by this method.
ActiveMQException |
Implements activemq::core::MessageDispatchChannel.
|
virtual |
Used to get an enqueued message if there is one queued right now.
If there is no waiting message than this method returns Null.
Implements activemq::core::MessageDispatchChannel.
|
virtual |
Add a Message to the Channel behind all pending message.
message | - The message to add to the Channel. |
Implements activemq::core::MessageDispatchChannel.
|
virtual |
Add a message to the front of the Channel.
message | - The Message to add to the front of the Channel. |
Implements activemq::core::MessageDispatchChannel.
|
inlinevirtual |
Implements activemq::core::MessageDispatchChannel.
|
virtual |
Implements activemq::core::MessageDispatchChannel.
|
inlinevirtual |
Implements activemq::core::MessageDispatchChannel.
|
inlinevirtual |
Locks the object.
RuntimeException | if an error occurs while locking the object. |
Implements decaf::util::concurrent::Synchronizable.
|
inlinevirtual |
Signals a waiter on this object that it can now wake up and continue.
Must have this object locked before calling.
IllegalMonitorStateException | - if the current thread is not the owner of the the Synchronizable Object. |
RuntimeException | if an error occurs while notifying one of the waiting threads. |
Implements decaf::util::concurrent::Synchronizable.
|
inlinevirtual |
Signals the waiters on this object that it can now wake up and continue.
Must have this object locked before calling.
IllegalMonitorStateException | - if the current thread is not the owner of the the Synchronizable Object. |
RuntimeException | if an error occurs while notifying the waiting threads. |
Implements decaf::util::concurrent::Synchronizable.
|
virtual |
Peek in the Queue and return the first message in the Channel without removing it from the channel.
Implements activemq::core::MessageDispatchChannel.
|
virtual |
Remove all messages that are currently in the Channel and return them as a list of Messages.
Implements activemq::core::MessageDispatchChannel.
|
virtual |
Implements activemq::core::MessageDispatchChannel.
|
virtual |
Starts dispatch of messages from the Channel.
Implements activemq::core::MessageDispatchChannel.
|
virtual |
Stops dispatch of message from the Channel.
Implements activemq::core::MessageDispatchChannel.
|
inlinevirtual |
Attempts to Lock the object, if the lock is already held by another thread than this method returns false.
RuntimeException | if an error occurs while locking the object. |
Implements decaf::util::concurrent::Synchronizable.
|
inlinevirtual |
Unlocks the object.
RuntimeException | if an error occurs while unlocking the object. |
Implements decaf::util::concurrent::Synchronizable.
|
inlinevirtual |
Waits on a signal from this object, which is generated by a call to Notify.
Must have this object locked before calling.
RuntimeException | if an error occurs while waiting on the object. |
InterruptedException | if the wait is interrupted before it completes. |
IllegalMonitorStateException | - if the current thread is not the owner of the the Synchronizable Object. |
Implements decaf::util::concurrent::Synchronizable.
|
inlinevirtual |
Waits on a signal from this object, which is generated by a call to Notify.
Must have this object locked before calling. This wait will timeout after the specified time interval.
millisecs | the time in milliseconds to wait, or WAIT_INIFINITE |
RuntimeException | if an error occurs while waiting on the object. |
InterruptedException | if the wait is interrupted before it completes. |
IllegalMonitorStateException | - if the current thread is not the owner of the the Synchronizable Object. |
Implements decaf::util::concurrent::Synchronizable.
|
inlinevirtual |
Waits on a signal from this object, which is generated by a call to Notify.
Must have this object locked before calling. This wait will timeout after the specified time interval. This method is similar to the one argument wait function except that it add a finer grained control over the amount of time that it waits by adding in the additional nanosecond argument.
NOTE: The ability to wait accurately at a nanosecond scale depends on the platform and OS that the Decaf API is running on, some systems do not provide an accurate enough clock to provide this level of granularity.
millisecs | the time in milliseconds to wait, or WAIT_INIFINITE |
nanos | additional time in nanoseconds with a range of 0-999999 |
IllegalArgumentException | if an error occurs or the nanos argument is not in the range of [0-999999] |
RuntimeException | if an error occurs while waiting on the object. |
InterruptedException | if the wait is interrupted before it completes. |
IllegalMonitorStateException | - if the current thread is not the owner of the the Synchronizable Object. |
Implements decaf::util::concurrent::Synchronizable.