Class RevisionGC
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.state.RevisionGC
-
- All Implemented Interfaces:
RevisionGCMBean
public class RevisionGC extends java.lang.Object implements RevisionGCMBean
Default implementation ofRevisionGCMBean
based on aRunnable
.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
OP_NAME
-
Fields inherited from interface org.apache.jackrabbit.oak.spi.state.RevisionGCMBean
TYPE
-
-
Constructor Summary
Constructors Constructor Description RevisionGC(@NotNull java.lang.Runnable runGC, @NotNull java.lang.Runnable cancelGC, @NotNull java.util.concurrent.Executor executor)
RevisionGC(@NotNull java.lang.Runnable runGC, @NotNull java.lang.Runnable cancelGC, @NotNull java.util.function.Supplier<java.lang.String> statusMessage, @NotNull java.util.concurrent.Executor executor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull javax.management.openmbean.CompositeData
cancelRevisionGC()
Cancel a running revision garbage collection operation.@NotNull javax.management.openmbean.CompositeData
getRevisionGCStatus()
Revision garbage collection status@NotNull javax.management.openmbean.CompositeData
startRevisionGC()
Initiate a revision garbage collection operation
-
-
-
Field Detail
-
OP_NAME
public static final java.lang.String OP_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RevisionGC
public RevisionGC(@NotNull @NotNull java.lang.Runnable runGC, @NotNull @NotNull java.lang.Runnable cancelGC, @NotNull @NotNull java.util.function.Supplier<java.lang.String> statusMessage, @NotNull @NotNull java.util.concurrent.Executor executor)
- Parameters:
runGC
- Revision garbage collectorcancelGC
- Executor for cancelling the garbage collection taskstatusMessage
- an informal status message describing the status of the background operation at the time of invocation.executor
- Executor for initiating the garbage collection task
-
RevisionGC
public RevisionGC(@NotNull @NotNull java.lang.Runnable runGC, @NotNull @NotNull java.lang.Runnable cancelGC, @NotNull @NotNull java.util.concurrent.Executor executor)
- Parameters:
runGC
- Revision garbage collectorcancelGC
- Executor for cancelling the garbage collection taskexecutor
- Executor for initiating the garbage collection task
-
-
Method Detail
-
startRevisionGC
@NotNull public @NotNull javax.management.openmbean.CompositeData startRevisionGC()
Description copied from interface:RevisionGCMBean
Initiate a revision garbage collection operation- Specified by:
startRevisionGC
in interfaceRevisionGCMBean
- Returns:
- the status of the operation right after it was initiated
-
cancelRevisionGC
@NotNull public @NotNull javax.management.openmbean.CompositeData cancelRevisionGC()
Description copied from interface:RevisionGCMBean
Cancel a running revision garbage collection operation. Does nothing if revision garbage collection is not running.- Specified by:
cancelRevisionGC
in interfaceRevisionGCMBean
- Returns:
- the status of the operation right after it was initiated
-
getRevisionGCStatus
@NotNull public @NotNull javax.management.openmbean.CompositeData getRevisionGCStatus()
Description copied from interface:RevisionGCMBean
Revision garbage collection status- Specified by:
getRevisionGCStatus
in interfaceRevisionGCMBean
- Returns:
- the status of the ongoing operation or if none the terminal status of the last operation or Status not available if none.
-
-