Interface ByteBufferPoolProvider
- All Known Implementing Classes:
SnapshotBufferManager
public interface ByteBufferPoolProvider
Provides specialized byte buffer pools optimized for different I/O operations.
This interface serves as a factory for obtaining buffer pools configured for:
- Encryption operations (with algorithm-specific sizing)
- High-performance disk writes (when
NodeSnapshotConfiguration.snapshotDiskBufferSizeBytes()coincides with OS page size)
All returned buffer pools are configured according to NodeSnapshotConfiguration.
-
Method Summary
Modifier and TypeMethodDescriptionencryptionPool(Cipher cipher) Provides a buffer pool configured for cryptographic operations using the specified cipher.Provides a buffer pool optimized for disk write operations.
-
Method Details
-
encryptionPool
Provides a buffer pool configured for cryptographic operations using the specified cipher. The returned pool manages buffers that comply with:- Algorithm-specific block size requirements
- Input/output size constraints for the cipher
- Padding requirements for complete blocks
- Parameters:
cipher- the cryptographic cipher that determines buffer sizing requirements.- Returns:
- configured buffer pool for encryption/decryption operations.
-
flushToDiskPool
ByteBufferPool flushToDiskPool()Provides a buffer pool optimized for disk write operations. The pool features:- Configurable pool size and buffers based on
NodeSnapshotConfiguration - Buffers sized to minimize write amplification
- Returns:
- buffer pool optimized for disk I/O operations
- Configurable pool size and buffers based on
-