- All Known Implementing Classes:
BufferCacheImpl
public interface BufferCache
Internal API for managing reusable buffers
- Author:
- mbechler
This interface is intended for internal use.
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]Gets a buffer from the cache or creates a new one if the cache is empty.voidreleaseBuffer(byte[] buf) Return a buffer to the cache
-
Method Details
-
getBuffer
byte[] getBuffer()Gets a buffer from the cache or creates a new one if the cache is empty.- Returns:
- a buffer from the cache, or a new one
-
releaseBuffer
void releaseBuffer(byte[] buf) Return a buffer to the cache- Parameters:
buf- the buffer to return to the cache for reuse
-