public class CompressionProcessor extends GridProcessorAdapter
IgniteComponentType.COMPRESSION
GridComponent.DiscoveryDataExchangeType
Modifier and Type | Field and Description |
---|---|
protected static byte |
COMPACTED_PAGE |
protected static byte |
LZ4_COMPRESSED_PAGE |
static int |
LZ4_DEFAULT_LEVEL |
static int |
LZ4_MAX_LEVEL |
static int |
LZ4_MIN_LEVEL |
protected static byte |
SNAPPY_COMPRESSED_PAGE |
static byte |
UNCOMPRESSED_PAGE |
protected static byte |
ZSTD_COMPRESSED_PAGE |
static int |
ZSTD_DEFAULT_LEVEL |
static int |
ZSTD_MAX_LEVEL |
static int |
ZSTD_MIN_LEVEL |
ctx, diagnosticLog, log
Constructor and Description |
---|
CompressionProcessor(GridKernalContext ctx) |
Modifier and Type | Method and Description |
---|---|
static int |
checkCompressionLevelBounds(int compressLevel,
DiskPageCompression compression) |
void |
checkPageCompressionSupported()
Checks weither page compression is supported.
|
void |
checkPageCompressionSupported(Path storagePath,
int pageSize) |
ByteBuffer |
compressPage(ByteBuffer page,
int pageSize,
int storeBlockSize,
DiskPageCompression compression,
int compressLevel) |
void |
decompressPage(ByteBuffer page,
int pageSize) |
static int |
getDefaultCompressionLevel(DiskPageCompression compression) |
assertParameter, collectGridNodeData, collectJoiningNodeData, discoveryDataType, onDisconnected, onGridDataReceived, onJoiningNodeDataReceived, onKernalStart, onKernalStop, onReconnected, printMemoryStats, start, stop, toString, validateNode, validateNode
public static final int LZ4_MIN_LEVEL
public static final int LZ4_MAX_LEVEL
public static final int LZ4_DEFAULT_LEVEL
public static final int ZSTD_MIN_LEVEL
public static final int ZSTD_MAX_LEVEL
public static final int ZSTD_DEFAULT_LEVEL
public static final byte UNCOMPRESSED_PAGE
protected static final byte COMPACTED_PAGE
protected static final byte ZSTD_COMPRESSED_PAGE
protected static final byte LZ4_COMPRESSED_PAGE
protected static final byte SNAPPY_COMPRESSED_PAGE
public CompressionProcessor(GridKernalContext ctx)
ctx
- Kernal context.public static int getDefaultCompressionLevel(DiskPageCompression compression)
compression
- Compression algorithm.public static int checkCompressionLevelBounds(int compressLevel, DiskPageCompression compression)
compressLevel
- Compression level.compression
- Compression algorithm.public void checkPageCompressionSupported() throws IgniteCheckedException
IgniteCheckedException
- If compression is not supported.public void checkPageCompressionSupported(Path storagePath, int pageSize) throws IgniteCheckedException
storagePath
- Storage path.pageSize
- Page size.IgniteCheckedException
- If compression is not supported.public ByteBuffer compressPage(ByteBuffer page, int pageSize, int storeBlockSize, DiskPageCompression compression, int compressLevel) throws IgniteCheckedException
page
- Page buffer.pageSize
- Page size.storeBlockSize
- Store block size.compression
- Compression algorithm.compressLevel
- Compression level.IgniteCheckedException
- If failed.public void decompressPage(ByteBuffer page, int pageSize) throws IgniteCheckedException
page
- Possibly compressed page buffer.pageSize
- Page size.IgniteCheckedException
- If failed.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.10.0 Release Date : March 10 2021