public class CachedContentCleaner extends java.lang.Thread implements FileHandler, org.springframework.context.ApplicationEventPublisherAware
| Constructor and Description |
|---|
CachedContentCleaner() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute() |
void |
execute(java.lang.String reasonMessage) |
void |
executeAggressive(java.lang.String reason,
long targetReductionBytes) |
java.io.File |
getCacheRoot()
Returns the cacheRoot that this cleaner is responsible for.
|
long |
getDurationMillis() |
long |
getDurationSeconds() |
long |
getNumFilesDeleted() |
long |
getNumFilesMarked() |
long |
getNumFilesSeen() |
long |
getSizeFilesDeleted() |
double |
getSizeFilesDeletedMB() |
java.util.Date |
getTimeFinished() |
java.util.Date |
getTimeStarted() |
void |
handle(java.io.File cachedContentFile) |
void |
init()
This method MUST be called after the cleaner has been fully constructed
to notify interested parties that the cleaner exists and to start the actual cleaner thread.
|
boolean |
isRunning() |
void |
run() |
void |
setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher eventPublisher) |
void |
setCache(ContentCacheImpl cache) |
void |
setMaxDeleteWatchCount(java.lang.Integer maxDeleteWatchCount)
Sets the maxDeleteWatchCount value.
|
void |
setMinFileAgeMillis(long minFileAgeMillis)
Sets the minimum age of a cache file before it will be considered for deletion.
|
void |
setUsageTracker(UsageTracker usageTracker) |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic void init()
public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void execute()
public void executeAggressive(java.lang.String reason,
long targetReductionBytes)
public void execute(java.lang.String reasonMessage)
public void handle(java.io.File cachedContentFile)
handle in interface FileHandlerpublic void setCache(ContentCacheImpl cache)
public void setMinFileAgeMillis(long minFileAgeMillis)
minFileAgeMillis - CachedContentCleaner.oldEnoughForCleanup(File)public void setMaxDeleteWatchCount(java.lang.Integer maxDeleteWatchCount)
maxDeleteWatchCount - CachedContentCleaner.markOrDelete(File, CacheFileProps)public void setUsageTracker(UsageTracker usageTracker)
usageTracker - the usageTracker to setpublic boolean isRunning()
public long getNumFilesSeen()
public long getNumFilesDeleted()
public long getSizeFilesDeleted()
public double getSizeFilesDeletedMB()
public long getNumFilesMarked()
public java.util.Date getTimeStarted()
public java.util.Date getTimeFinished()
public long getDurationSeconds()
public long getDurationMillis()
public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher eventPublisher)
setApplicationEventPublisher in interface org.springframework.context.ApplicationEventPublisherAwarepublic java.io.File getCacheRoot()
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.