org.jacorb.notification.queue
Class RWLockEventQueueDecorator
java.lang.Object
org.jacorb.notification.queue.RWLockEventQueueDecorator
- All Implemented Interfaces:
- MessageQueueAdapter
- public class RWLockEventQueueDecorator
- extends java.lang.Object
- implements MessageQueueAdapter
- Version:
- $Id: RWLockEventQueueDecorator.java,v 1.8 2006/03/03 19:54:48 alphonse.bendt Exp $
- Author:
- Alphonse Bendt
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
RWLockEventQueueDecorator
public RWLockEventQueueDecorator(MessageQueueAdapter initialDelegate)
replaceDelegate
public void replaceDelegate(MessageQueueAdapter newDelegate)
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
enqeue
public void enqeue(Message message)
throws java.lang.InterruptedException
- Specified by:
enqeue
in interface MessageQueueAdapter
- Throws:
java.lang.InterruptedException
hasPendingMessages
public boolean hasPendingMessages()
throws java.lang.InterruptedException
- Specified by:
hasPendingMessages
in interface MessageQueueAdapter
- Throws:
java.lang.InterruptedException
getPendingMessagesCount
public int getPendingMessagesCount()
throws java.lang.InterruptedException
- Specified by:
getPendingMessagesCount
in interface MessageQueueAdapter
- Throws:
java.lang.InterruptedException
getMessageBlocking
public Message getMessageBlocking()
throws java.lang.InterruptedException
- Specified by:
getMessageBlocking
in interface MessageQueueAdapter
- Throws:
java.lang.InterruptedException
getMessageNoBlock
public Message getMessageNoBlock()
throws java.lang.InterruptedException
- Specified by:
getMessageNoBlock
in interface MessageQueueAdapter
- Throws:
java.lang.InterruptedException
getAllMessages
public Message[] getAllMessages()
throws java.lang.InterruptedException
- Specified by:
getAllMessages
in interface MessageQueueAdapter
- Throws:
java.lang.InterruptedException
getUpToMessages
public Message[] getUpToMessages(int max)
throws java.lang.InterruptedException
- Specified by:
getUpToMessages
in interface MessageQueueAdapter
- Throws:
java.lang.InterruptedException
getAtLeastMessages
public Message[] getAtLeastMessages(int min)
throws java.lang.InterruptedException
- Specified by:
getAtLeastMessages
in interface MessageQueueAdapter
- Throws:
java.lang.InterruptedException
clear
public void clear()
- Specified by:
clear
in interface MessageQueueAdapter
toString
public java.lang.String toString()
getDiscardPolicyName
public java.lang.String getDiscardPolicyName()
- Specified by:
getDiscardPolicyName
in interface MessageQueueAdapter
getOrderPolicyName
public java.lang.String getOrderPolicyName()
- Specified by:
getOrderPolicyName
in interface MessageQueueAdapter
addDiscardListener
public void addDiscardListener(MessageQueue.DiscardListener listener)
- Specified by:
addDiscardListener
in interface MessageQueueAdapter
removeDiscardListener
public void removeDiscardListener(MessageQueue.DiscardListener listener)
- Specified by:
removeDiscardListener
in interface MessageQueueAdapter