Package org.eclipse.rdf4j.sail.memory
Class MemorySailStore.SnapshotMonitor
- java.lang.Object
-
- org.eclipse.rdf4j.sail.memory.MemorySailStore.SnapshotMonitor
-
- Enclosing class:
- MemorySailStore
static class MemorySailStore.SnapshotMonitor extends java.lang.Object
SnapshotMonitor is used to keep track of which snapshot version are no longer is use (read or write) so that we can safely clean that snapshot version.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
MemorySailStore.SnapshotMonitor.ReservedSnapshot
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.ConcurrentHashMap<java.lang.Integer,java.util.concurrent.atomic.LongAdder>
activeSnapshots
private static ConcurrentCleaner
cleaner
private boolean
debug
private java.util.concurrent.atomic.AtomicInteger
highestEverReservedSnapshot
-
Constructor Summary
Constructors Constructor Description SnapshotMonitor(boolean debug)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getFirstUnusedOrElse(int currentSnapshot)
MemorySailStore.SnapshotMonitor.ReservedSnapshot
reserve(int snapshot, java.lang.Object reservedBy)
-
-
-
Field Detail
-
cleaner
private static final ConcurrentCleaner cleaner
-
activeSnapshots
private final java.util.concurrent.ConcurrentHashMap<java.lang.Integer,java.util.concurrent.atomic.LongAdder> activeSnapshots
-
debug
private final boolean debug
-
highestEverReservedSnapshot
private final java.util.concurrent.atomic.AtomicInteger highestEverReservedSnapshot
-
-
Method Detail
-
getFirstUnusedOrElse
public int getFirstUnusedOrElse(int currentSnapshot)
-
reserve
public MemorySailStore.SnapshotMonitor.ReservedSnapshot reserve(int snapshot, java.lang.Object reservedBy)
-
-