org.apache.ignite.internal.processors.cache.persistence.diagnostic.pagelocktracker

## Class SharedPageLockTracker

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.persistence.diagnostic.pagelocktracker.SharedPageLockTracker

All Implemented Interfaces:
  DumpSupported<ThreadPageLocksDumpLock>, PageLockListener, LifecycleAware

    public class SharedPageLockTracker
    extends Object
    implements LifecycleAware, PageLockListener, DumpSupported<ThreadPageLocksDumpLock>

### Nested Class Summary

Nested Classes
`static class` `SharedPageLockTracker.State`

### Field Summary

Fields
`int` `threadLimits`
`int` `timeOutWorkerInterval`

### Constructor Summary

Constructors
Constructor and Description
`SharedPageLockTracker()`
`SharedPageLockTracker(Consumer<Set<SharedPageLockTracker.State>> hangThreadsCallBack, PageLockTrackerManager.MemoryCalculator memCalc)`
`SharedPageLockTracker(int threadLimits, int timeOutWorkerInterval, Consumer<Set<SharedPageLockTracker.State>> hangThreadsCallBack, PageLockTrackerManager.MemoryCalculator memCalc)`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `acquireSafePoint()`
`ThreadPageLocksDumpLock` `dump()` Create dump.
`IgniteFuture<ThreadPageLocksDumpLock>` `dumpSync()` Create dump async.
`void` `onBeforeReadLock(int structureId, long pageId, long page)`
`void` `onBeforeWriteLock(int structureId, long pageId, long page)`
`void` `onReadLock(int structureId, long pageId, long page, long pageAddr)`
`void` `onReadUnlock(int structureId, long pageId, long page, long pageAddr)`
`void` `onWriteLock(int structureId, long pageId, long page, long pageAddr)`
`void` `onWriteUnlock(int structureId, long pageId, long page, long pageAddr)`
`PageLockListener` `registrateStructure(String structureName)`
`boolean` `releaseSafePoint()`
`void` `start()` Starts grid component, called on grid start.
`void` `stop()` Stops grid component, called on grid shutdown.

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

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

### Field Detail

#### threadLimits

    public final int threadLimits

#### timeOutWorkerInterval

    public final int timeOutWorkerInterval

### Constructor Detail

#### SharedPageLockTracker

    public SharedPageLockTracker()

#### SharedPageLockTracker

    public SharedPageLockTracker(Consumer<Set<SharedPageLockTracker.State>> hangThreadsCallBack,
                                 PageLockTrackerManager.MemoryCalculator memCalc)

#### SharedPageLockTracker

    public SharedPageLockTracker(int threadLimits,
                                 int timeOutWorkerInterval,
                                 Consumer<Set<SharedPageLockTracker.State>> hangThreadsCallBack,
                                 PageLockTrackerManager.MemoryCalculator memCalc)

### Method Detail

#### registrateStructure

    public PageLockListener registrateStructure(String structureName)

#### onBeforeWriteLock

    public void onBeforeWriteLock(int structureId,
                                  long pageId,
                                  long page)

Specified by:
  `onBeforeWriteLock` in interface `PageLockListener`
Parameters:
  `structureId` - Cache ID.
  `pageId` - Page ID.
  `page` - Page pointer.

#### onWriteLock

    public void onWriteLock(int structureId,
                            long pageId,
                            long page,
                            long pageAddr)

Specified by:
  `onWriteLock` in interface `PageLockListener`
Parameters:
  `structureId` - Cache ID.
  `pageId` - Page ID.
  `page` - Page pointer.
  `pageAddr` - Page address.

#### onWriteUnlock

    public void onWriteUnlock(int structureId,
                              long pageId,
                              long page,
                              long pageAddr)

Specified by:
  `onWriteUnlock` in interface `PageLockListener`
Parameters:
  `structureId` - Cache ID.
  `pageId` - Page ID.
  `page` - Page pointer.
  `pageAddr` - Page address.

#### onBeforeReadLock

    public void onBeforeReadLock(int structureId,
                                 long pageId,
                                 long page)

Specified by:
  `onBeforeReadLock` in interface `PageLockListener`
Parameters:
  `structureId` - Cache ID.
  `pageId` - Page ID.
  `page` - Page pointer.

#### onReadLock

    public void onReadLock(int structureId,
                           long pageId,
                           long page,
                           long pageAddr)

Specified by:
  `onReadLock` in interface `PageLockListener`
Parameters:
  `structureId` - Cache ID.
  `pageId` - Page ID.
  `page` - Page pointer.
  `pageAddr` - Page address.

#### onReadUnlock

    public void onReadUnlock(int structureId,
                             long pageId,
                             long page,
                             long pageAddr)

Specified by:
  `onReadUnlock` in interface `PageLockListener`
Parameters:
  `structureId` - Cache ID.
  `pageId` - Page ID.
  `page` - Page pointer.
  `pageAddr` - Page address.

#### dump

    public ThreadPageLocksDumpLock dump()

Create dump.

Specified by:
  `dump` in interface `DumpSupported<ThreadPageLocksDumpLock>`

#### start

    public void start()
               throws IgniteException

Starts grid component, called on grid start.

Specified by:
  `start` in interface `LifecycleAware`
Throws:
  `IgniteException` - If failed.

#### stop

    public void stop()
              throws IgniteException

Stops grid component, called on grid shutdown.

Specified by:
  `stop` in interface `LifecycleAware`
Throws:
  `IgniteException` - If failed.

#### dumpSync

    public IgniteFuture<ThreadPageLocksDumpLock> dumpSync()

Create dump async.

Specified by:
  `dumpSync` in interface `DumpSupported<ThreadPageLocksDumpLock>`
Returns:
  Ignite future.

#### acquireSafePoint

    public boolean acquireSafePoint()

Specified by:
  `acquireSafePoint` in interface `DumpSupported<ThreadPageLocksDumpLock>`

#### releaseSafePoint

    public boolean releaseSafePoint()

Specified by:
  `releaseSafePoint` in interface `DumpSupported<ThreadPageLocksDumpLock>`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.9.0
Release Date | : October 15 2020