Class GCNodeWriteMonitor
- java.lang.Object
-
- org.apache.jackrabbit.oak.segment.file.GCNodeWriteMonitor
-
public class GCNodeWriteMonitor extends java.lang.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 GCNodeWriteMonitor
EMPTY
-
Constructor Summary
Constructors Constructor Description GCNodeWriteMonitor(long gcProgressLog, @NotNull GCMonitor gcMonitor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
finished()
long
getCompactedNodes()
Compacted nodes in current cycleint
getEstimatedPercentage()
Estimated completion percentage.long
getEstimatedTotal()
Estimated nodes to compact in current cycle.long
getGcProgressLog()
void
init(long prevSize, long prevCompactedNodes, long currentSize)
boolean
isCompactionRunning()
void
onBinary()
void
onNode()
void
onProperty()
-
-
-
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-1
if the estimation could not be performed.
-
getEstimatedPercentage
public int getEstimatedPercentage()
Estimated completion percentage. Can be-1
if the estimation could not be performed.
-
isCompactionRunning
public boolean isCompactionRunning()
-
getGcProgressLog
public long getGcProgressLog()
-
-