org.jgroups.util
Class MessageTransferQueue

java.lang.Object
  extended by org.jgroups.util.MessageTransferQueue

public class MessageTransferQueue
extends java.lang.Object

Concurrent queue containing messages. When the max capacity is reached, producers will block until the capacity drops below the max capacity. The max capacity and size of the queue is defined as the accumulated length of the messages. Null messages are not permitted.

Version:
$Id$
Author:
Bela Ban

Constructor Summary
MessageTransferQueue(int max_capacity)
           
 
Method Summary
 Message poll()
           
 int put(Message msg)
           
 Message take()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageTransferQueue

public MessageTransferQueue(int max_capacity)
Parameters:
max_capacity - The max capacity in bytes
Method Detail

put

public int put(Message msg)

take

public Message take()

poll

public Message poll()


Copyright © 1998-2009 Bela Ban / Red Hat. All Rights Reserved.