A data buffer pool.
More...
◆ DataBufferPool() [1/2]
| fm.liveswitch.DataBufferPool.DataBufferPool |
( |
| ) |
|
◆ DataBufferPool() [2/2]
| fm.liveswitch.DataBufferPool.DataBufferPool |
( |
String |
tag | ) |
|
◆ getBlockSize()
| int fm.liveswitch.DataBufferPool.getBlockSize |
( |
| ) |
|
◆ getDisabled()
| boolean fm.liveswitch.DataBufferPool.getDisabled |
( |
| ) |
|
Gets whether the pool is disabled.
If disabled, each call to take a buffer will result in a new allocation.
◆ getEnableStatistics()
| boolean fm.liveswitch.DataBufferPool.getEnableStatistics |
( |
| ) |
|
Gets whether to enable statistics.
◆ getInstance()
Gets the singleton instance.
◆ getIsSupported()
| static boolean fm.liveswitch.DataBufferPool.getIsSupported |
( |
| ) |
|
|
static |
Gets a value indicating whether DataBuffer pooling is supported on this platform.
◆ getPooledBytesAvailable()
| long fm.liveswitch.DataBufferPool.getPooledBytesAvailable |
( |
| ) |
|
◆ getStatistics()
Gets the pool usage statistics.
◆ getTracer() [1/4]
Get a data buffer pool tracer for a specific tag using the default pool.
The tag is taken from the class namespace and name.
- Parameters
-
| type | The type to use as the tag. |
- Returns
- A tracer that will associate stats with the tag.
◆ getTracer() [2/4]
Get a data buffer pool tracer for a specific tag and pool.
The tag is taken from the class namespace and name.
- Parameters
-
| type | The type to use as the tag. |
| pool | The underlying pool. |
- Returns
- A tracer that will associate stats with the tag.
◆ getTracer() [3/4]
Get a data buffer pool tracer for a specific tag using the default pool.
- Parameters
-
- Returns
- A tracer that will associate stats with the type.
◆ getTracer() [4/4]
Get a data buffer pool tracer for a specific tag and pool.
- Parameters
-
| tag | The tag to log to. |
| pool | The underlying pool. |
- Returns
- A tracer that will associate stats with the type.
◆ getTraceStatistics() [1/3]
Gets all tagged pool usage statistics.
◆ getTraceStatistics() [2/3]
Gets pool usage statistics for a specific tag.
- Parameters
-
| type | The type to use as the tag. |
◆ getTraceStatistics() [3/3]
Gets pool usage statistics for a specific tag.
- Parameters
-
◆ releasePools()
| void fm.liveswitch.DataBufferPool.releasePools |
( |
| ) |
|
◆ setDisabled()
| void fm.liveswitch.DataBufferPool.setDisabled |
( |
boolean |
value | ) |
|
Sets whether the pool is disabled.
If disabled, each call to take a buffer will result in a new allocation.
◆ setEnableStatistics()
| void fm.liveswitch.DataBufferPool.setEnableStatistics |
( |
boolean |
value | ) |
|
Sets whether to enable statistics.
◆ take() [1/3]
◆ take() [2/3]
Takes a buffer from the pool.
- Parameters
-
| size | The number of bytes needed. |
| littleEndian | Whether the data buffer should be little-endian. |
Implements fm.liveswitch.IDataBufferPool.
◆ take() [3/3]
Takes a buffer from the pool.
- Parameters
-
| size | The number of bytes needed. |
| littleEndian | Whether the data buffer should be little-endian. |
| clearBytes | Whether to clear the data buffer. |
Implements fm.liveswitch.IDataBufferPool.