Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

CacheInvalidator Class Reference

Inheritance diagram for CacheInvalidator:

Client NetworkCache NetworkCombo List of all members.

Public Member Functions

 this (ICluster cluster, char[] channel)
void invalidate (char[] key, ulong timeLimit=ulong.max)

Private Member Functions

IChannel getChannel ()
ICluster getCluster ()
long getTime ()
IChannel createChannel (char[] name)

Static Private Member Functions

 this ()

Private Attributes

InvalidatorPayload filter

Static Private Attributes

NullMessage EmptyMessage

Detailed Description

Utility class to invalidate specific cache entries across a network. Any active CacheInvalidatee objects listening upon the channel specified for this class will "wake up" whenever the invalidate() method is invoked.

Definition at line 51 of file CacheInvalidator.d.


Member Function Documentation

this ICluster  cluster,
char[]  channel
[inline]
 

Construct an invalidator on the specified channel. Only those CacheInvalidatee instances configured for the same channel will be listening to this invalidator.

Reimplemented from Client.

Reimplemented in NetworkCache.

Definition at line 63 of file CacheInvalidator.d.

void invalidate char[]  key,
ulong  timeLimit = ulong.max
[inline]
 

Invalidate all network cache instances on this channel using the specified key. When 'timeLimit' is specified, only those cache entries with a time lesser or equal to that specified will be removed. This is often useful if you wish to avoid invalidating a cache (local or remote) that has just been updated; simply pass the time value of the 'old' IPayload as the argument.

Note that this is asynchronous! An invalidation is just a request to remove the item within a short time period. If you need the entry removed synchronously, you should use the NetworkCache extract() method instead.

Definition at line 90 of file CacheInvalidator.d.

Referenced by NetworkCombo::put(), and testInvalidatee().

this  )  [inline, static, inherited]
 

Definition at line 63 of file Client.d.

References Client::EmptyMessage.

IChannel getChannel  )  [inline, inherited]
 

Return the channel we're tuned to

Definition at line 94 of file Client.d.

References Client::channel.

ICluster getCluster  )  [inline, inherited]
 

Return the cluster specified during construction

Definition at line 105 of file Client.d.

References Client::cluster.

long getTime  )  [inline, inherited]
 

Return the number of milliseconds since Jan 1st 1970

Definition at line 116 of file Client.d.

IChannel createChannel char[]  name  )  [inline, inherited]
 

Create a channel with the specified name. A channel represents something akin to a publush/subscribe topic, or a radio station. These are used to segregate cluster operations into a set of groups, where each group is represented by a channel. Channel names are whatever you want then to be; use of dot notation has proved useful in the past. In fact, a good way to think about channels is to map them directly to a class name. That is, since you typically send and recieve classes on a channel, you might utilize the class name as the channel (this.classinfo.name).

Definition at line 136 of file Client.d.

References Client::cluster, and ICluster::createChannel().


Member Data Documentation

InvalidatorPayload filter [private]
 

Definition at line 53 of file CacheInvalidator.d.

NullMessage EmptyMessage [static, inherited]
 

Definition at line 61 of file Client.d.

Referenced by Client::this().


The documentation for this class was generated from the following file:
Generated on Sun Nov 7 19:07:00 2004 for Mango by doxygen 1.3.6