public class CachedContentCleaner extends Thread implements FileHandler, org.springframework.context.ApplicationEventPublisherAware
Thread.State, Thread.UncaughtExceptionHandler
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
CachedContentCleaner() |
Modifier and Type | Method and Description |
---|---|
void |
execute() |
void |
execute(String reasonMessage) |
void |
executeAggressive(String reason,
long targetReductionBytes) |
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() |
Date |
getTimeFinished() |
Date |
getTimeStarted() |
void |
handle(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(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, yield
public void init()
public void execute()
public void executeAggressive(String reason, long targetReductionBytes)
public void execute(String reasonMessage)
public void handle(File cachedContentFile)
handle
in interface FileHandler
public void setCache(ContentCacheImpl cache)
public void setMinFileAgeMillis(long minFileAgeMillis)
minFileAgeMillis
- longoldEnoughForCleanup(File)
public void setMaxDeleteWatchCount(Integer maxDeleteWatchCount)
maxDeleteWatchCount
- IntegermarkOrDelete(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 Date getTimeStarted()
public Date getTimeFinished()
public long getDurationSeconds()
public long getDurationMillis()
public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher eventPublisher)
setApplicationEventPublisher
in interface org.springframework.context.ApplicationEventPublisherAware
public File getCacheRoot()
Copyright © 2005–2017 Alfresco Software. All rights reserved.