org.apache.ignite.internal.managers.encryption

## Class CacheGroupPageScanner

- java.lang.Object
- - org.apache.ignite.internal.managers.encryption.CacheGroupPageScanner

All Implemented Interfaces:
  CheckpointListener

    public class CacheGroupPageScanner
    extends Object
    implements CheckpointListener

Cache group page stores scanner. Scans a range of pages and marks them as dirty to re-encrypt them with the last encryption key on disk.

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.apache.ignite.internal.processors.cache.persistence.checkpoint.CheckpointListener

`CheckpointListener.Context`

### Constructor Summary

Constructors
Constructor and Description
`CacheGroupPageScanner(GridKernalContext ctx)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `beforeCheckpointBegin(CheckpointListener.Context cpCtx)` Do some actions before checkpoint write lock.
`boolean` `excludePartition(int grpId, int partId)` Stop scannig the specified partition.
`double` `getRate()`
`void` `onCheckpointBegin(CheckpointListener.Context cpCtx)`
`void` `onMarkCheckpointBegin(CheckpointListener.Context ctx)`
`long[]` `pagesCount(CacheGroupContext grp)` Collect current number of pages in the specified cache group.
`long` `remainingPagesCount(int grpId)`
`IgniteInternalFuture<Void>` `schedule(int grpId)` Schedule scanning partitions.
`void` `setRate(double rate)`
`IgniteInternalFuture<Void>` `statusFuture(int grpId)`
`void` `stop()` Shutdown scanning and disable new tasks scheduling.

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

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

### Methods inherited from interface org.apache.ignite.internal.processors.cache.persistence.checkpoint.CheckpointListener

`afterCheckpointEnd`

### Constructor Detail

#### CacheGroupPageScanner

    public CacheGroupPageScanner(GridKernalContext ctx)

Parameters:
  `ctx` - Grid kernal context.

### Method Detail

#### onCheckpointBegin

    public void onCheckpointBegin(CheckpointListener.Context cpCtx)

Specified by:
  `onCheckpointBegin` in interface `CheckpointListener`

#### beforeCheckpointBegin

    public void beforeCheckpointBegin(CheckpointListener.Context cpCtx)

Do some actions before checkpoint write lock.

Specified by:
  `beforeCheckpointBegin` in interface `CheckpointListener`

#### onMarkCheckpointBegin

    public void onMarkCheckpointBegin(CheckpointListener.Context ctx)

Specified by:
  `onMarkCheckpointBegin` in interface `CheckpointListener`

#### schedule

    public IgniteInternalFuture<Void> schedule(int grpId)
                                        throws IgniteCheckedException

Schedule scanning partitions.

Parameters:
  `grpId` - Cache group ID.
Throws:
  `IgniteCheckedException`

#### statusFuture

    public IgniteInternalFuture<Void> statusFuture(int grpId)

Parameters:
  `grpId` - Cache group ID.
Returns:
  Future that will be completed when all partitions have been scanned and pages have been written to disk.

#### stop

    public void stop()
              throws IgniteCheckedException

Shutdown scanning and disable new tasks scheduling.

Throws:
  `IgniteCheckedException`

#### excludePartition

    public boolean excludePartition(int grpId,
                                    int partId)

Stop scannig the specified partition.

Parameters:
  `grpId` - Cache group ID.
  `partId` - Partition ID.
Returns:
  `True` if reencryption was cancelled.

#### pagesCount

    public long[] pagesCount(CacheGroupContext grp)
                      throws IgniteCheckedException

Collect current number of pages in the specified cache group.

Parameters:
  `grp` - Cache group.
Returns:
  Partitions with current page count.
Throws:
  `IgniteCheckedException` - If failed.

#### remainingPagesCount

    public long remainingPagesCount(int grpId)

Parameters:
  `grpId` - Cache group ID.
Returns:
  Number of remaining memory pages to scan.

#### getRate

    public double getRate()

Returns:
  Re-encryption rate limit in megabytes per second (`0` - unlimited).

#### setRate

    public void setRate(double rate)

Parameters:
  `rate` - Re-encryption rate limit in megabytes per second (`0` - unlimited).

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.10.0
Release Date | : March 10 2021