Inheritance diagram for IRemoteCacheLoader:
Public Member Functions | |
uint | pause (uint wait) |
long | getTime () |
void | setTime (long time) |
void | destroy () |
char[] | getGuid () |
void | write (IWriter w) |
Private Member Functions | |
bool | test (IPayload p) |
IPayload | load (char[] key, long time) |
Definition at line 158 of file ICache.d.
|
Return the sleep duration between attempts to retrieve a locked cache entry. Consider setting this duration to be approximately half the time you'd expect each remote cache-load to typically consume. The 'wait' argument is a representation of how many microseconds have added up while waiting. When this value exceeds some limit, you should return zero to indicate a timeout condition. Note that the return value should be in microseconds ~ one tenth of a second equals 100_000 microseconds. Note also that you might consider returning a sliding value, where the pause starts off small, and increases as time passes. A simple implementation might look like this:
Referenced by testRemoteCacheLoader(). |
|
Reimplemented in Payload. Referenced by PlainCache::bind(), PlainCache::extract(), CacheServer::LoaderThread::load(), and NetworkCombo::put(). |
|
Reimplemented in Payload. |
|
Perform whatever cleanup is necessary. Could use ~this() instead, but I prefer it to be truly explicit. Reimplemented in Payload, QueuedEntry, InvalidatorPayload, and ClusterEntry. Referenced by CacheInvalidatee::notify(). |
|
Identify this serializable class via a char[]. This should be (per class) unique within the domain. Use version numbers or similar mechanism to isolate different implementations of the same class. Reimplemented in Payload, InvalidatorPayload, Message, NullMessage, Task, and RollCall. Referenced by ClusterServer::addCacheLoader(), PickleWriter::freeze(), testClassSerialization(), and testRemoteCacheLoader(). |
|
Reimplemented in Payload, InvalidatorPayload, Message, Task, Channel, RollCall, ResponseLine, Cookie, HttpCookies, HttpMessage, HttpRequest, HttpResponse, HttpTokens, NewlineWriter, FilePath, Token, and Uri. Referenced by PickleWriter::freeze(), HttpClient::open(), AbstractWriter::put(), testClassIO(), testClassSerialization(), testCompositeIO(), testRemoteCacheLoader(), and HttpRequest::write(). |
|
Test the cache entry to see if it is still valid. A true return value indicates the entry is valid, whereas false flags the entry as stale. The latter case will cause the load() method to be invoked. Reimplemented in NetworkCache::RemoteLoader. Referenced by PlainCache::bind(), testCacheLoader(), and testRemoteCacheLoader(). |
|
Load a cache entry from wherever the content is persisted. The 'time' argument represents that belonging to a stale entry, which can be used to optimize the loader operation (no need to perform a full load where there's already a newer version in an L2 cache). This 'time' value will be long.min where was no such stale entry. Reimplemented in NetworkCache::RemoteLoader. Referenced by PlainCache::bind(), CacheServer::LoaderThread::load(), testCacheLoader(), and testRemoteCacheLoader(). |