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

## Class CheckpointTimeoutLock

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.persistence.checkpoint.CheckpointTimeoutLock

    public class CheckpointTimeoutLock
    extends Object

Checkpoint lock for outer usage which should be used to protect data during writing to memory. It contains complex logic for the correct taking of inside checkpoint lock(timeout, force checkpoint, etc.).

### Field Summary

Fields
`protected IgniteLogger` `log` Ignite logger.

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `checkpointLockIsHeldByThread()`
`void` `checkpointReadLock()` Gets the checkpoint read lock.
`long` `checkpointReadLockTimeout()` Timeout for checkpoint read lock acquisition.
`void` `checkpointReadLockTimeout(long val)` Sets timeout for checkpoint read lock acquisition.
`void` `checkpointReadUnlock()` Releases the checkpoint read lock.
`void` `start()` Prepare the lock to further usage.
`void` `stop()` Forbid to take this lock.

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

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

### Field Detail

#### log

    protected final IgniteLogger log

Ignite logger.

### Method Detail

#### checkpointReadLock

    public void checkpointReadLock()

Gets the checkpoint read lock. While this lock is held, checkpoint thread will not acquireSnapshotWorker memory state.

Throws:
  `IgniteException` - If failed.

#### checkpointReadUnlock

    public void checkpointReadUnlock()

Releases the checkpoint read lock.

#### checkpointReadLockTimeout

    public long checkpointReadLockTimeout()

Timeout for checkpoint read lock acquisition.

Returns:
  Timeout for checkpoint read lock acquisition in milliseconds.

#### checkpointReadLockTimeout

    public void checkpointReadLockTimeout(long val)

Sets timeout for checkpoint read lock acquisition.

Parameters:
  `val` - New timeout in milliseconds, non-positive value denotes infinite timeout.

#### checkpointLockIsHeldByThread

    public boolean checkpointLockIsHeldByThread()

Returns:
  true if checkpoint lock is held by current thread

#### stop

    public void stop()

Forbid to take this lock.

#### start

    public void start()

Prepare the lock to further usage.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.11.0
Release Date | : September 11 2021