Package org.jenkinsci.remoting.util
Interface ByteBufferPool
- All Known Implementing Classes:
DirectByteBufferPool
,IOHub
,ProtocolStack
public interface ByteBufferPool
API for a pool of
ByteBuffer
s.-
Method Summary
Modifier and TypeMethodDescriptionacquire
(int size) Borrow a buffer from the pool.void
release
(ByteBuffer buffer) Returns a buffer to the pool.
-
Method Details
-
acquire
Borrow a buffer from the pool.- Parameters:
size
- The minimum size and initial limit of the buffer.- Returns:
- the buffer.
-
release
Returns a buffer to the pool.- Parameters:
buffer
- the buffer.
-