Package 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 Description GridSnapshotLock()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidbeginUpdate()Must be called before update begin.protected abstract XdoSnapshot()voidendUpdate()Signal that update operation finished.Xsnapshot()booleantryBeginUpdate()
-
-
-
Method Detail
-
beginUpdate
public void beginUpdate()
Must be called before update begin.
-
tryBeginUpdate
public boolean tryBeginUpdate()
- Returns:
trueIf 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.
-
-