org.jgroups.util
Class OutgoingBufferPool
java.lang.Object
org.jgroups.util.OutgoingBufferPool
public class OutgoingBufferPool
- extends java.lang.Object
Maintains a pool of ExposedDataOutputStreams. The main reason is that a ByteArrayOutputStream starts with 1024
bytes, and almost always increases to 65K (max size of a UDP datagram). We save a few copies when the BAOS increases
its size by pooling those.
- Version:
- $Id: OutgoingBufferPool.java,v 1.1 2007/01/07 01:24:52 belaban Exp $
- Author:
- Bela Ban
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OutgoingBufferPool
public OutgoingBufferPool(int capacity)
take
public ExposedDataOutputStream take()
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
put
public void put(ExposedDataOutputStream buf)
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
dumpStats
public java.lang.String dumpStats()
Copyright ? 1998-2008 Bela Ban. All Rights Reserved.