|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.neeve.root.RootObject
com.neeve.rog.RogObject
com.neeve.rog.log.RogLogCompactor
public final class RogLogCompactor
Compacts a log's live log file
Nested Class Summary | |
---|---|
static class |
RogLogCompactor.State
Enmerates the various compactor states |
Method Summary | |
---|---|
RogLogCompactor |
compact()
Perform the log compaction This method kicks off the background compaction of the live transaction log file. |
RogLogCompactor |
compact(long forceCheckpointCompletionOn)
Perform the log compaction |
long |
getMaxCompactionWindowSize()
Gets the compaction window size. |
RogLogCompactor.State |
getState()
Get the current compaction state |
boolean |
isCompactionInProgress()
Get is compaction is in progress |
void |
setMaxCompactionWindowSize(long size)
May be used to change the compaction windows size. |
void |
stop()
Stop any running compaction |
void |
waitForCompactionToComplete()
Wait for compaction to complete |
Methods inherited from class com.neeve.root.RootObject |
---|
getChecked, getThreaded, getTracer, setChecked, setTracer |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public final void setMaxCompactionWindowSize(long size)
size
- The size (in megabytes to set for the compaction window.
IllegalStateException
- if isCompactionInProgress()
is true.
IllegalArgumentException
- if the compaction window size is invalid (<=0).public final long getMaxCompactionWindowSize()
public final RogLogCompactor.State getState()
public final RogLogCompactor compact(long forceCheckpointCompletionOn)
forceCheckpointCompletionOn
- Specifies a checkpoint version that forces
the completion of a checkpoint in the compacted log. This value is used in
conjunction with the compaction window to determine when to complete a
checkpoint in the compacted log. A value of <=0 in this parameter will
cause only the compaction window to be used. A value of > 0 will cause
the compaction window to be used but will force the checkpoint to be
completed immediately after processing the checkpoint version specified
in this parameter.
This method kicks off the background compaction of the live transaction
log file. The caller can track the status of the compaction by polling
the state via the getState()
method.
public final RogLogCompactor compact()
This method kicks off the background compaction of the live transaction
log file. The caller can track the status of the compaction by polling
the state via the getState()
method.
public final boolean isCompactionInProgress()
public final void waitForCompactionToComplete() throws Exception
Exception
public final void stop()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |