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

CacheInvalidatee Class Reference

Inheritance diagram for CacheInvalidatee:

Client IEventListener List of all members.

Public Member Functions

 this (ICluster cluster, char[] channel, IMutableCache cache)
void cancel ()
IMutableCache getCache ()

Protected Member Functions

void notify (IEvent event, IPayload payload)

Private Member Functions

 this (ICluster cluster, char[] channel)
IChannel getChannel ()
ICluster getCluster ()
long getTime ()
IChannel createChannel (char[] name)

Static Private Member Functions

 this ()

Private Attributes

IMutableCache cache
ILogger logger
IConsumer consumer

Static Private Attributes

NullMessage EmptyMessage

Detailed Description

Wrapper around an ICache instance that attaches it to the network, and ensures the former complies with cache invalidation requests. Use this in conjunction with CacheInvalidator or NetworkCombo. The ICache provided should typically be synchronized against thread contention since it will potentially have entries removed from a listener thread (you won't need synchronization if you're using the concurrent hash-map ICache implementation).

Definition at line 61 of file CacheInvalidatee.d.


Member Function Documentation

this ICluster  cluster,
char[]  channel,
IMutableCache  cache
[inline]
 

Construct a CacheInvalidatee upon the given cache, using the named channel. This channel should be a name that's common to both the receiver and the sender.

Definition at line 75 of file CacheInvalidatee.d.

References cache.

void cancel  )  [inline]
 

Detach from the network. The CacheInvalidatee is disabled from this point forward.

Definition at line 100 of file CacheInvalidatee.d.

References IConsumer::cancel(), and consumer.

IMutableCache getCache  )  [inline]
 

Return the IMutableCache instance provided during construction

Definition at line 111 of file CacheInvalidatee.d.

References cache.

void notify IEvent  event,
IPayload  payload
[inline, protected]
 

Notification callback from the listener. We remove the indicated entry from our cache and destroy the payload immediately in case it belongs on a freelist.

Reimplemented from IEventListener.

Definition at line 124 of file CacheInvalidatee.d.

References cache, IPayload::destroy(), IMutableCache::extract(), IEvent::getChannel(), IChannel::getName(), InvalidatorPayload::getText(), InvalidatorPayload::getTimeout(), ILogger::isEnabled(), ILevel::Level, logger, and ILogger::trace().

this  )  [inline, static, inherited]
 

Definition at line 63 of file Client.d.

References Client::EmptyMessage.

this ICluster  cluster,
char[]  channel
[inline, inherited]
 

Construct this client with the specified channel and cluster. The former specifies something akin to a 'topic', whilst the latter provides access to the underlying functional substrate (the QOS implementation). A good way to think about channels is to map them directly to a class name. That is, since you send and recieve classes on a channel, you might utilize the class name as the channel name (this.classinfo.name).

Reimplemented in CacheInvalidator, NetworkAlert, NetworkCache, and NetworkQueue.

Definition at line 80 of file Client.d.

References Client::channel, and Client::cluster.

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

IMutableCache cache [private]
 

Definition at line 63 of file CacheInvalidatee.d.

Referenced by getCache(), notify(), and this().

ILogger logger [private]
 

Definition at line 64 of file CacheInvalidatee.d.

Referenced by notify().

IConsumer consumer [private]
 

Definition at line 65 of file CacheInvalidatee.d.

Referenced by cancel().

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