org.apache.ignite.internal.util

## Class GridSnapshotLock<X>

- java.lang.Object
- - org.apache.ignite.internal.util.GridSnapshotLock<X>

    public abstract class GridSnapshotLock<X>
    extends Object

Synchronization primitive allowing concurrent updates and taking consistent snapshots.

### Constructor Summary

Constructors
Constructor and Description
`GridSnapshotLock()`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`void` `beginUpdate()` Must be called before update begin.
`protected abstract X` `doSnapshot()`
`void` `endUpdate()` Signal that update operation finished.
`X` `snapshot()`
`boolean` `tryBeginUpdate()`

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

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

### Constructor Detail

#### GridSnapshotLock

    public GridSnapshotLock()

### Method Detail

#### beginUpdate

    public void beginUpdate()

Must be called before update begin.

#### tryBeginUpdate

    public boolean tryBeginUpdate()

Returns:
  `true` If it is possible to proceed the update operation.

#### endUpdate

    public void endUpdate()

Signal that update operation finished.

#### snapshot

    public X snapshot()

Returns:
  Consistent snapshot of data.

#### doSnapshot

    protected abstract X doSnapshot()

Returns:
  Snapshot.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.8.1
Release Date | : May 21 2020