Class GCNodeWriteMonitor
- java.lang.Object
-
- org.apache.jackrabbit.oak.segment.file.GCNodeWriteMonitor
-
public class GCNodeWriteMonitor extends Object
Monitors the compaction cycle and keeps a compacted nodes counter, in order to provide a best effort progress log based on extrapolating the previous size and node count and current size to deduce current node count.
-
-
Field Summary
Fields Modifier and Type Field Description static GCNodeWriteMonitorEMPTY
-
Constructor Summary
Constructors Constructor Description GCNodeWriteMonitor(long gcProgressLog, @NotNull GCMonitor gcMonitor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfinished()longgetCompactedNodes()Compacted nodes in current cycleintgetEstimatedPercentage()Estimated completion percentage.longgetEstimatedTotal()Estimated nodes to compact in current cycle.longgetGcProgressLog()voidinit(long prevSize, long prevCompactedNodes, long currentSize)booleanisCompactionRunning()voidonBinary()voidonNode()voidonProperty()
-
-
-
Field Detail
-
EMPTY
public static final GCNodeWriteMonitor EMPTY
-
-
Constructor Detail
-
GCNodeWriteMonitor
public GCNodeWriteMonitor(long gcProgressLog, @NotNull @NotNull GCMonitor gcMonitor)
-
-
Method Detail
-
init
public void init(long prevSize, long prevCompactedNodes, long currentSize)- Parameters:
prevSize- size from latest successful compactionprevCompactedNodes- number of nodes compacted during latest compaction operationcurrentSize- current repository size
-
onNode
public void onNode()
-
onProperty
public void onProperty()
-
onBinary
public void onBinary()
-
finished
public void finished()
-
getCompactedNodes
public long getCompactedNodes()
Compacted nodes in current cycle
-
getEstimatedTotal
public long getEstimatedTotal()
Estimated nodes to compact in current cycle. Can be-1if the estimation could not be performed.
-
getEstimatedPercentage
public int getEstimatedPercentage()
Estimated completion percentage. Can be-1if the estimation could not be performed.
-
isCompactionRunning
public boolean isCompactionRunning()
-
getGcProgressLog
public long getGcProgressLog()
-
-