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

ICluster Struct Reference

Inheritance diagram for ICluster:

Cluster List of all members.

Public Member Functions

IChannel createChannel (char[] channel)
void broadcast (IChannel channel, IPayload payload=null)
IConsumer createConsumer (IChannel channel, IEvent.Style style, IEventListener notify)
IPayload getCache (IChannel channel, char[] key, bool remove)
IPayload putCache (IChannel channel, char[] key, IPayload payload)
IPayload putQueue (IChannel channel, IPayload payload)
IPayload getQueue (IChannel channel)
void loadCache (IChannel channel, char[] key, IPayload payload)
ILogger getLogger ()

Detailed Description

The contract exposed by each QOS implementation. This is the heart of the cluster package, designed with multiple implementations in mind. It should be reasonably straightforward to construct specific implementations upon a database, pub/sub system, or other substrates.

Definition at line 58 of file ICluster.d.


Member Function Documentation

IChannel createChannel char[]  channel  ) 
 

Create a channel instance. Every cluster operation has a channel provided as an argument

Reimplemented in Cluster.

Referenced by Client::createChannel().

void broadcast IChannel  channel,
IPayload  payload = null
 

Scatter a payload to all registered listeners. This is akin to multicast.

Reimplemented in Cluster.

Referenced by NetworkAlert::broadcast().

IConsumer createConsumer IChannel  channel,
IEvent.Style  style,
IEventListener  notify
 

Create a listener of the specified style on the given channel. The IEventListener should be called whenever a corresponding cluster event happens. Note that the notification is expected to be on a seperate thread.

Reimplemented in Cluster.

Referenced by NetworkQueue::createConsumer(), and NetworkAlert::createConsumer().

IPayload getCache IChannel  channel,
char[]  key,
bool  remove
 

Return a cluster cache entry, and optionally remove it from the cluster.

Reimplemented in Cluster.

IPayload putCache IChannel  channel,
char[]  key,
IPayload  payload
 

Place a cache entry into the cluster. If there is already a matching entry, it is replaced.

Reimplemented in Cluster.

IPayload putQueue IChannel  channel,
IPayload  payload
 

Place a new entry into the cluster queue. This may throw a ClusterFullException when there is no space left within the cluster queues.

Reimplemented in Cluster.

Referenced by NetworkQueue::put().

IPayload getQueue IChannel  channel  ) 
 

Query the cluster for queued entries on our corresponding channel. Returns, and removes, the first matching entry from the cluster.

Reimplemented in Cluster.

Referenced by NetworkQueue::get().

void loadCache IChannel  channel,
char[]  key,
IPayload  payload
 

Reimplemented in Cluster.

ILogger getLogger  ) 
 

Return the Logger associated with this cluster

Reimplemented in Cluster.

Referenced by TaskServer::addConsumer(), and TaskServer::this().


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