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.ObjectSnapshotMonitor 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 classMemorySailStore.SnapshotMonitor.ReservedSnapshot
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.ConcurrentHashMap<java.lang.Integer,java.util.concurrent.atomic.LongAdder>activeSnapshotsprivate static ConcurrentCleanercleanerprivate booleandebugprivate java.util.concurrent.atomic.AtomicIntegerhighestEverReservedSnapshot
-
Constructor Summary
Constructors Constructor Description SnapshotMonitor(boolean debug)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetFirstUnusedOrElse(int currentSnapshot)MemorySailStore.SnapshotMonitor.ReservedSnapshotreserve(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)
-
-