public class SegmentRevisionGCMBean extends org.apache.jackrabbit.oak.commons.jmx.AnnotatedStandardMBean implements SegmentRevisionGC
TYPE
Constructor and Description |
---|
SegmentRevisionGCMBean(@NotNull FileStore fileStore,
@NotNull SegmentGCOptions gcOptions,
@NotNull FileStoreGCMonitor fileStoreGCMonitor) |
Modifier and Type | Method and Description |
---|---|
void |
cancelRevisionGC()
Cancel a running revision garbage collection operation.
|
long |
getCompactedNodes() |
long |
getEstimatedCompactableNodes() |
int |
getEstimatedRevisionGCCompletion() |
int |
getForceTimeout()
Get the number of seconds to attempt to force compact concurrent commits on top of
already compacted commits after the maximum number of retries has been reached.
|
long |
getGcSizeDeltaEstimation() |
String |
getGCType() |
long |
getLastCleanup() |
long |
getLastCompaction() |
@Nullable String |
getLastError() |
@NotNull String |
getLastLogMessage() |
long |
getLastReclaimedSize() |
long |
getLastRepositorySize() |
int |
getMemoryThreshold()
Get the available memory threshold beyond which revision gc will be
canceled.
|
int |
getRetainedGenerations()
Number of segment generations to retain.
|
int |
getRetryCount()
Get the number of tries to compact concurrent commits on top of already
compacted commits
|
long |
getRevisionGCProgressLog() |
@NotNull String |
getStatus() |
boolean |
isEstimationDisabled() |
boolean |
isPausedCompaction() |
boolean |
isRevisionGCRunning() |
void |
setEstimationDisabled(boolean disabled)
Disables the estimation phase, thus allowing GC to run every time.
|
void |
setForceTimeout(int timeout)
Set the number of seconds to attempt to force compact concurrent commits on top of
already compacted commits after the maximum number of retries has been reached.
|
void |
setGcSizeDeltaEstimation(long gcSizeDeltaEstimation) |
void |
setGCType(String gcType) |
void |
setMemoryThreshold(int memoryThreshold)
Set the available memory threshold beyond which revision gc will be
canceled.
|
void |
setPausedCompaction(boolean paused)
Set revision gc to paused.
|
void |
setRetainedGenerations(int retainedGenerations)
Set the number of segment generations to retain: each compaction run creates
a new segment generation.
|
void |
setRetryCount(int retryCount)
Set the number of tries to compact concurrent commits on top of already
compacted commits
|
void |
setRevisionGCProgressLog(long gcProgressLog)
Set the size of the logging interval,
-1 means disabled |
void |
startRevisionGC()
Initiate a revision garbage collection operation
|
getDescription, getDescription, getDescription, getDescription, getImpact, getParameterName
cacheMBeanInfo, getAttribute, getAttributes, getCachedMBeanInfo, getClassName, getConstructors, getDescription, getDescription, getDescription, getImplementation, getImplementationClass, getMBeanInfo, getMBeanInterface, getParameterName, invoke, postDeregister, postRegister, preDeregister, preRegister, setAttribute, setAttributes, setImplementation
public SegmentRevisionGCMBean(@NotNull @NotNull FileStore fileStore, @NotNull @NotNull SegmentGCOptions gcOptions, @NotNull @NotNull FileStoreGCMonitor fileStoreGCMonitor)
public boolean isPausedCompaction()
isPausedCompaction
in interface SegmentRevisionGC
true
iff revision gc is paused.public void setPausedCompaction(boolean paused)
SegmentRevisionGC
setPausedCompaction
in interface SegmentRevisionGC
public int getRetryCount()
SegmentRevisionGC
getRetryCount
in interface SegmentRevisionGC
public void setRetryCount(int retryCount)
SegmentRevisionGC
setRetryCount
in interface SegmentRevisionGC
public int getForceTimeout()
SegmentRevisionGC
getForceTimeout
in interface SegmentRevisionGC
public void setForceTimeout(int timeout)
SegmentRevisionGC
setForceTimeout
in interface SegmentRevisionGC
timeout
- the number of seconds until forced compaction gives up and the exclusive
lock on the node store is released.public int getRetainedGenerations()
SegmentRevisionGC
getRetainedGenerations
in interface SegmentRevisionGC
SegmentRevisionGC.setRetainedGenerations(int)
public void setRetainedGenerations(int retainedGenerations)
SegmentRevisionGC
retainGenerations
determines how many of
those generations are retained during cleanup.setRetainedGenerations
in interface SegmentRevisionGC
retainedGenerations
- number of generations to retain. Must be >= 2
.public long getGcSizeDeltaEstimation()
getGcSizeDeltaEstimation
in interface SegmentRevisionGC
public void setGcSizeDeltaEstimation(long gcSizeDeltaEstimation)
setGcSizeDeltaEstimation
in interface SegmentRevisionGC
public boolean isEstimationDisabled()
isEstimationDisabled
in interface SegmentRevisionGC
public void setEstimationDisabled(boolean disabled)
SegmentRevisionGC
setEstimationDisabled
in interface SegmentRevisionGC
public String getGCType()
getGCType
in interface SegmentRevisionGC
public void setGCType(String gcType)
setGCType
in interface SegmentRevisionGC
public void startRevisionGC()
SegmentRevisionGC
startRevisionGC
in interface SegmentRevisionGC
public void cancelRevisionGC()
SegmentRevisionGC
cancelRevisionGC
in interface SegmentRevisionGC
public long getLastCompaction()
getLastCompaction
in interface SegmentRevisionGC
public long getLastCleanup()
getLastCleanup
in interface SegmentRevisionGC
public long getLastRepositorySize()
getLastRepositorySize
in interface SegmentRevisionGC
public long getLastReclaimedSize()
getLastReclaimedSize
in interface SegmentRevisionGC
@Nullable public @Nullable String getLastError()
getLastError
in interface SegmentRevisionGC
null
if none.@NotNull public @NotNull String getLastLogMessage()
getLastLogMessage
in interface SegmentRevisionGC
null
if none.@NotNull public @NotNull String getStatus()
getStatus
in interface SegmentRevisionGC
public int getMemoryThreshold()
SegmentRevisionGC
getMemoryThreshold
in interface SegmentRevisionGC
public void setMemoryThreshold(int memoryThreshold)
SegmentRevisionGC
0
and
100
is expected. Setting this to 0
will disable the
check.setMemoryThreshold
in interface SegmentRevisionGC
public boolean isRevisionGCRunning()
isRevisionGCRunning
in interface SegmentRevisionGC
true
if there is an online compaction cycle runningpublic long getCompactedNodes()
getCompactedNodes
in interface SegmentRevisionGC
public long getEstimatedCompactableNodes()
getEstimatedCompactableNodes
in interface SegmentRevisionGC
-1
if the estimation can't be performedpublic int getEstimatedRevisionGCCompletion()
getEstimatedRevisionGCCompletion
in interface SegmentRevisionGC
-1
if the estimation can't be performed.public long getRevisionGCProgressLog()
getRevisionGCProgressLog
in interface SegmentRevisionGC
-1
means disabledpublic void setRevisionGCProgressLog(long gcProgressLog)
SegmentRevisionGC
-1
means disabledsetRevisionGCProgressLog
in interface SegmentRevisionGC
gcProgressLog
- number of nodesCopyright © 2012–2020 The Apache Software Foundation. All rights reserved.