public class DatadirCleanupManager extends Object
Modifier and Type | Class and Description |
---|---|
static class |
DatadirCleanupManager.PurgeTaskStatus
Status of the dataDir purge task
|
Constructor and Description |
---|
DatadirCleanupManager(String snapDir,
String dataLogDir,
int snapRetainCount,
int purgeInterval)
Constructor of DatadirCleanupManager.
|
Modifier and Type | Method and Description |
---|---|
String |
getDataLogDir()
Returns transaction log directory.
|
int |
getPurgeInterval()
Returns purge interval in hours.
|
DatadirCleanupManager.PurgeTaskStatus |
getPurgeTaskStatus()
Returns the status of the purge task.
|
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(String snapDir, 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 String getSnapDir()
public String getDataLogDir()
public int getPurgeInterval()
public int getSnapRetainCount()
Copyright © 2014 The Apache Software Foundation