|
AsyncWrite | Get (string relativePath, DateTime modifiedUtc) |
| If the collection contains the specified item, it is returned. Otherwise, null is returned. More...
|
|
long | GetQueuedBufferBytes () |
| Returns how many bytes are allocated by buffers in the queue. May be 2x the amount of data. Represents how much ram is being used by the queue, not the amount of encoded bytes that will actually be written. More...
|
|
void | Remove (AsyncWrite w) |
| Removes the specified object based on its relativepath and modifieddateutc values. More...
|
|
bool | Queue (AsyncWrite w, WriterDelegate writerDelegate) |
| Returns false when (a) the specified AsyncWrite value already exists, (b) the queue is full, or (c) the thread pool queue is full More...
|
|
delegate void | WriterDelegate (AsyncWrite w) |
|
string | HashTogether (string relativePath, DateTime modifiedUtc) |
|
|
long | MaxQueueBytes [get, set] |
| How many bytes of buffered file data to hold in memory before refusing futher queue requests and forcing them to be executed synchronously. More...
|
|
Definition at line 8 of file AsyncWriteCollection.cs.
AsyncWrite ImageResizer.Plugins.DiskCache.Async.AsyncWriteCollection.Get |
( |
string |
relativePath, |
|
|
DateTime |
modifiedUtc |
|
) |
| |
|
inline |
If the collection contains the specified item, it is returned. Otherwise, null is returned.
- Parameters
-
- Returns
Definition at line 33 of file AsyncWriteCollection.cs.
36 return c.TryGetValue(HashTogether(relativePath, modifiedUtc), out result) ? result : null;
long ImageResizer.Plugins.DiskCache.Async.AsyncWriteCollection.GetQueuedBufferBytes |
( |
| ) |
|
|
inline |
Returns how many bytes are allocated by buffers in the queue. May be 2x the amount of data. Represents how much ram is being used by the queue, not the amount of encoded bytes that will actually be written.
- Returns
Definition at line 44 of file AsyncWriteCollection.cs.
47 foreach (AsyncWrite value
in c.Values) {
48 if (value == null)
continue;
49 total += value.GetBufferLength();
bool ImageResizer.Plugins.DiskCache.Async.AsyncWriteCollection.Queue |
( |
AsyncWrite |
w, |
|
|
WriterDelegate |
writerDelegate |
|
) |
| |
|
inline |
Returns false when (a) the specified AsyncWrite value already exists, (b) the queue is full, or (c) the thread pool queue is full
- Parameters
-
- Returns
Definition at line 69 of file AsyncWriteCollection.cs.
72 if (c.ContainsKey(HashTogether(w.RelativePath, w.ModifiedDateUtc)))
return false;
73 if (!ThreadPool.QueueUserWorkItem(delegate(
object state){
74 AsyncWrite job = state as AsyncWrite;
long MaxQueueBytes
How many bytes of buffered file data to hold in memory before refusing futher queue requests and forc...
long GetQueuedBufferBytes()
Returns how many bytes are allocated by buffers in the queue. May be 2x the amount of data...
void ImageResizer.Plugins.DiskCache.Async.AsyncWriteCollection.Remove |
( |
AsyncWrite |
w | ) |
|
|
inline |
Removes the specified object based on its relativepath and modifieddateutc values.
- Parameters
-
Definition at line 59 of file AsyncWriteCollection.cs.
61 c.Remove(HashTogether(w.RelativePath, w.ModifiedDateUtc));
long ImageResizer.Plugins.DiskCache.Async.AsyncWriteCollection.MaxQueueBytes |
|
getset |
How many bytes of buffered file data to hold in memory before refusing futher queue requests and forcing them to be executed synchronously.
Definition at line 22 of file AsyncWriteCollection.cs.
The documentation for this class was generated from the following file: