Package 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
-
-
Constructor Summary
Constructors Constructor Description OutgoingBufferPool(int capacity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
dumpStats()
void
put(ExposedDataOutputStream buf)
ExposedDataOutputStream
take()
-
-
-
Method Detail
-
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()
-
-