public class DatadirCleanupManager
extends java.lang.Object
Modifier and Type | Class | Description |
---|---|---|
static class |
DatadirCleanupManager.PurgeTaskStatus |
Status of the dataDir purge task
|
Constructor | Description |
---|---|
DatadirCleanupManager(java.lang.String snapDir,
java.lang.String dataLogDir,
int snapRetainCount,
int purgeInterval) |
Constructor of DatadirCleanupManager.
|
Modifier and Type | Method | Description |
---|---|---|
java.lang.String |
getDataLogDir() |
Returns transaction log directory.
|
int |
getPurgeInterval() |
Returns purge interval in hours.
|
DatadirCleanupManager.PurgeTaskStatus |
getPurgeTaskStatus() |
Returns the status of the purge task.
|
java.lang.String |
getSnapDir() |
Returns the snapshot directory.
|
int |
getSnapRetainCount() |
Returns the number of snapshots to be retained after purge.
|
void |
shutdown() |
Shutdown the purge task.
|
void |
start() |
Validates the purge configuration and schedules the purge task.
|
public DatadirCleanupManager(java.lang.String snapDir, java.lang.String dataLogDir, int snapRetainCount, int purgeInterval)
snapDir
- snapshot directorydataLogDir
- transaction log directorysnapRetainCount
- number of snapshots to be retained after purgepurgeInterval
- purge interval in hourspublic void start()
snapRetainCount
number of
snapshots and deletes the remaining for every purgeInterval
hour(s).
purgeInterval
of 0
or
negative integer
will not schedule the purge task.
PurgeTxnLog.purge(File, File, int)
public void shutdown()
public DatadirCleanupManager.PurgeTaskStatus getPurgeTaskStatus()
public java.lang.String getSnapDir()
public java.lang.String getDataLogDir()
public int getPurgeInterval()
public int getSnapRetainCount()
Copyright © 2018 The Apache Software Foundation