Class RevisionGC
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.state.RevisionGC
-
- All Implemented Interfaces:
RevisionGCMBean
public class RevisionGC extends Object implements RevisionGCMBean
Default implementation ofRevisionGCMBean
based on aRunnable
.
-
-
Field Summary
Fields Modifier and Type Field Description static String
OP_NAME
-
Fields inherited from interface org.apache.jackrabbit.oak.spi.state.RevisionGCMBean
TYPE
-
-
Constructor Summary
Constructors Constructor Description RevisionGC(@NotNull Runnable runGC, @NotNull Runnable cancelGC, @NotNull Executor executor)
RevisionGC(@NotNull Runnable runGC, @NotNull Runnable cancelGC, @NotNull Supplier<String> statusMessage, @NotNull Executor executor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull CompositeData
cancelRevisionGC()
Cancel a running revision garbage collection operation.@NotNull CompositeData
getRevisionGCStatus()
Revision garbage collection status@NotNull CompositeData
startRevisionGC()
Initiate a revision garbage collection operation
-
-
-
Field Detail
-
OP_NAME
public static final String OP_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RevisionGC
public RevisionGC(@NotNull @NotNull Runnable runGC, @NotNull @NotNull Runnable cancelGC, @NotNull @NotNull Supplier<String> statusMessage, @NotNull @NotNull 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 Runnable runGC, @NotNull @NotNull Runnable cancelGC, @NotNull @NotNull 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 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 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 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.
-
-