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

NetworkCombo Class Reference

Inheritance diagram for NetworkCombo:

NetworkCache List of all members.

Public Member Functions

 this (ICluster cluster, char[] channel, IMutableCache cache)
IMutableCache getCache ()
IPayload get (char[] key)
void put (char[] key, IPayload payload, bool coherent=false)
IPayload extract (char[] key)

Private Member Functions

 this (ICluster cluster, char[] channel)
IPayload put (char[] key, IPayload payload)
ICache bind (ICacheLoader loader)
ICache bind (IRemoteCacheLoader loader)

Static Private Member Functions

 this ()

Private Attributes

IMutableCache cache
CacheInvalidatee invalidatee

Detailed Description

A combination of a local cache, cluster cache, and CacheInvalidatee. The two cache instances are combined such that they represent a classic level1/level2 cache. The CacheInvalidatee ensures that the level1 cache maintains coherency with the cluster.

Definition at line 290 of file NetworkCache.d.


Member Function Documentation

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

Construct a ComboCache for the specified local cache, and on the given cluster channel.

Definition at line 302 of file NetworkCache.d.

IMutableCache getCache  )  [inline]
 

Return the IMutableCache instance provided during construction

Definition at line 318 of file NetworkCache.d.

References invalidatee.

IPayload get char[]  key  )  [inline]
 

Get an IPayload from the local cache, and revert to the cluster cache if it's not found. Cluster lookups will place new content into the local cache.

Reimplemented from NetworkCache.

Definition at line 331 of file NetworkCache.d.

References ICache::get(), and IMutableCache::put().

void put char[]  key,
IPayload  payload,
bool  coherent = false
[inline]
 

Place a new entry into the cache. This will also place the entry into the cluster, and optionally invalidate all other local cache instances across the network. If a cache entry exists with the same key, it is replaced. Note that when using the coherency option you should ensure your IPayload has a valid time stamp, since that is used to set the cluster-wide "invalidation level". You can use the getTime() method to retrieve the current millisecond count.

Definition at line 358 of file NetworkCache.d.

References IPayload::getTime(), CacheInvalidator::invalidate(), and IMutableCache::put().

IPayload extract char[]  key  )  [inline]
 

Remove and return the cache entry corresponding to the provided key.

Reimplemented from NetworkCache.

Definition at line 379 of file NetworkCache.d.

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

Construct a NetworkCache using the QOS (cluster) provided, and hook it onto the specified channel. Each subsequent operation is tied to this channel.

Reimplemented from CacheInvalidator.

Definition at line 82 of file NetworkCache.d.

this  )  [inline, static, inherited]
 

Definition at line 63 of file Client.d.

References Client::EmptyMessage.

IPayload put char[]  key,
IPayload  payload
[inline, inherited]
 

Add a cluster cache entry. The entry will be placed in one or more of the cluster servers (depending upon QOS).

Definition at line 122 of file NetworkCache.d.

Referenced by testClusterCache().

ICache bind ICacheLoader  loader  )  [inline, inherited]
 

Bind a local loader to this network cache. The loader will check that a cache entry is valid, and load up a fresh instance where a stale one is found. Each stale entry with the equivalent timestamp is removed across the entire network,

Definition at line 140 of file NetworkCache.d.

Referenced by NetworkCache::bind(), and testRemoteCacheLoader().

ICache bind IRemoteCacheLoader  loader  )  [inline, inherited]
 

Bind a remote cache loader. Remote loaders are great for gating/synchronizing access to a particular resource over the entire cluster. When a cache entry fails its validity test, the loader is executed remotely by the cache host; the cache entry itself is 'locked' for the duration, such that requests from any cluster node will stall until the new entry is loaded. This is a convenient way to restrict load on an expensive resource (such as a slow or very busy back-end server).

Definition at line 159 of file NetworkCache.d.

References NetworkCache::bind().


Member Data Documentation

IMutableCache cache [private]
 

Definition at line 292 of file NetworkCache.d.

CacheInvalidatee invalidatee [private]
 

Definition at line 293 of file NetworkCache.d.

Referenced by getCache().


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