org.apache.ignite.internal.processors.compress

## Class CompressionHandler

- java.lang.Object
- - org.apache.ignite.internal.processors.compress.CompressionHandler

    public class CompressionHandler
    extends Object

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`boolean` `compressionEnabled()`
`ByteBuffer` `compressPage(ByteBuffer page, PageStore store)`
`static CompressionHandler` `create(GridKernalContext ctx, CacheConfiguration cfg)` Creates compression handler.
`DiskPageCompression` `diskPageCompression()`
`int` `diskPageCompressionLevel()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### diskPageCompression

    public DiskPageCompression diskPageCompression()

Returns:
  Disk page compression algorithm..

#### diskPageCompressionLevel

    public int diskPageCompressionLevel()

Returns:
  Disk page compression level.

#### compressionEnabled

    public boolean compressionEnabled()

Returns:
  `true` if disk page compression is enabled.

#### compressPage

    public ByteBuffer compressPage(ByteBuffer page,
                                   PageStore store)
                            throws IgniteCheckedException

Parameters:
  `page` - Page buffer.
  `store` - Page store.
Returns:
  Compressed or the same buffer.
Throws:
  `IgniteCheckedException` - If failed.

#### create

    public static CompressionHandler create(GridKernalContext ctx,
                                            CacheConfiguration cfg)
                                     throws IgniteCheckedException

Creates compression handler.

Parameters:
  `ctx` - Grid kernal context.
  `cfg` - Cache or cache group configuration.
Returns:
  Compression handler.
Throws:
  `IgniteCheckedException`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.16.0
Release Date | : December 15 2023