org.apache.ignite.internal.processors.cache.persistence.pagemem

## Class PagesWriteThrottle

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.persistence.pagemem.PagesWriteThrottle

All Implemented Interfaces:
  PagesWriteThrottlePolicy

    public class PagesWriteThrottle
    extends Object
    implements PagesWriteThrottlePolicy

Throttles threads that generate dirty pages during ongoing checkpoint. Designed to avoid zero dropdowns that can happen if checkpoint buffer is overflowed.

### Constructor Summary

Constructors
Constructor and Description
`PagesWriteThrottle(PageMemoryImpl pageMemory, CheckpointWriteProgressSupplier cpProgress, CheckpointLockStateChecker stateChecker, boolean throttleOnlyPagesInCheckpoint)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `onBeginCheckpoint()` Callback to notify throttling policy checkpoint was started.
`void` `onFinishCheckpoint()` Callback to notify throttling policy checkpoint was finished.
`void` `onMarkDirty(boolean isPageInCheckpoint)` Callback to apply throttling delay.

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

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

### Constructor Detail

#### PagesWriteThrottle

    public PagesWriteThrottle(PageMemoryImpl pageMemory,
                              CheckpointWriteProgressSupplier cpProgress,
                              CheckpointLockStateChecker stateChecker,
                              boolean throttleOnlyPagesInCheckpoint)

Parameters:
  `pageMemory` - Page memory.
  `cpProgress` - Database manager.
  `stateChecker` - checkpoint lock state checker.
  `throttleOnlyPagesInCheckpoint` - If true, throttle will only protect from checkpoint buffer overflow.

### Method Detail

#### onMarkDirty

    public void onMarkDirty(boolean isPageInCheckpoint)

Callback to apply throttling delay.

Specified by:
  `onMarkDirty` in interface `PagesWriteThrottlePolicy`
Parameters:
  `isPageInCheckpoint` - flag indicating if current page is in scope of current checkpoint.

#### onBeginCheckpoint

    public void onBeginCheckpoint()

Callback to notify throttling policy checkpoint was started.

Specified by:
  `onBeginCheckpoint` in interface `PagesWriteThrottlePolicy`

#### onFinishCheckpoint

    public void onFinishCheckpoint()

Callback to notify throttling policy checkpoint was finished.

Specified by:
  `onFinishCheckpoint` in interface `PagesWriteThrottlePolicy`

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.5.0
Release Date | : May 23 2018