ImageResizer
3.4.0
|
Public Member Functions | |
CleanupWorker (ILoggerProvider lp, CleanupStrategy cs, CleanupQueue queue, CustomDiskCache cache) | |
Creates and starts a thread that consumes the queue, pausing until notified when 'queue' empties. More... | |
void | MayHaveWork () |
Tells the worker to check the queue for more work. More... | |
void | BeLazy () |
Tells the worker to avoid work for a little bit. More... | |
override IEnumerable< IIssue > | GetIssues () |
Returns a copy of the list of reported issues. More... | |
void | Dispose () |
void | FlushAccessedDate (CleanupWorkItem item) |
Public Member Functions inherited from ImageResizer.Configuration.Issues.IssueSink | |
IssueSink (string defaultSource) | |
virtual void | AcceptIssue (IIssue i) |
Adds the specified issue to the list unless it is an exact duplicate of another instance. More... | |
Protected Member Functions | |
void | main () |
Thread runs this method. More... | |
void | mainInner () |
Processes work items from the queue, using at most 50% More... | |
bool | DoWorkFor (TimeSpan length) |
Processes items from the queue for roughly the specified amount of time. Returns false if the queue was empty. More... | |
void | DoTask (CleanupWorkItem item) |
string | addSlash (string s, bool physical) |
void | PopulateFolder (CleanupWorkItem item, bool recursive) |
void | RemoveFile (CleanupWorkItem item) |
void | CleanFolder (CleanupWorkItem item, bool recursvie) |
Protected Attributes | |
long | lastFoundItemsOverMax = DateTime.MinValue.Ticks |
The last time a cache folder exceeded both the optimum and maximum limits for file count. If recent, indicates a misconfiguration; the subfolders="" count needs to be increased. More... | |
long | lastBusy = DateTime.MinValue.Ticks |
The last time a cache query came through More... | |
long | lastWorked = DateTime.MinValue.Ticks |
The last time we did work (or attempted to do work, failing if the queue was empty) More... | |
bool | otherProcessManagingCleanup = false |
When true, indicates that another process is managing cleanup operations - this thread is idle, waiting for the other process to end before it can pick up work. More... | |
readonly object | _timesLock = new object() |
volatile bool | shuttingDown = false |
Protected Attributes inherited from ImageResizer.Configuration.Issues.IssueSink | |
string | defaultSource = null |
Properties | |
bool | ExteralProcessCleaning [get] |
When true, indicates that another process is managing cleanup operations - this thread is idle, waiting for the other process to end before it can pick up work. More... | |
Definition at line 14 of file CleanupWorker.cs.
|
inline |
Creates and starts a thread that consumes the queue, pausing until notified when 'queue' empties.
cs | |
queue | |
cache |
Definition at line 29 of file CleanupWorker.cs.
|
inline |
Tells the worker to avoid work for a little bit.
Definition at line 58 of file CleanupWorker.cs.
|
inlineprotected |
Processes items from the queue for roughly the specified amount of time. Returns false if the queue was empty.
length |
Definition at line 210 of file CleanupWorker.cs.
|
inlinevirtual |
Returns a copy of the list of reported issues.
Reimplemented from ImageResizer.Configuration.Issues.IssueSink.
Definition at line 190 of file CleanupWorker.cs.
|
inlineprotected |
Thread runs this method.
Definition at line 79 of file CleanupWorker.cs.
|
inlineprotected |
Processes work items from the queue, using at most 50%
Definition at line 91 of file CleanupWorker.cs.
|
inline |
Tells the worker to check the queue for more work.
Definition at line 41 of file CleanupWorker.cs.
|
protected |
The last time a cache query came through
Definition at line 54 of file CleanupWorker.cs.
|
protected |
The last time a cache folder exceeded both the optimum and maximum limits for file count. If recent, indicates a misconfiguration; the subfolders="" count needs to be increased.
Definition at line 49 of file CleanupWorker.cs.
|
protected |
The last time we did work (or attempted to do work, failing if the queue was empty)
Definition at line 65 of file CleanupWorker.cs.
|
protected |
When true, indicates that another process is managing cleanup operations - this thread is idle, waiting for the other process to end before it can pick up work.
Definition at line 74 of file CleanupWorker.cs.
|
get |
When true, indicates that another process is managing cleanup operations - this thread is idle, waiting for the other process to end before it can pick up work.
Definition at line 70 of file CleanupWorker.cs.