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

NodeSet Class Reference

List of all members.

Public Member Functions

 this (ILogger logger)
ILogger getLogger ()
synchronized void addNode (Node node)
void optimize ()
synchronized void enable (char[] name, ushort port1, ushort port2)
IPayload request (ProtocolWriter writer, ProtocolReader reader, char[] key=null)

Private Member Functions

final Node selectNode (uint index)
Node selectNode (char[] key=null)
bool scan (bool(*dg)(Node))

Private Attributes

HashMap map
Node[] nodes
Node[] random
ILogger logger

Detailed Description

Models a set of remote cluster nodes.

Definition at line 1114 of file Cluster.d.


Member Function Documentation

this ILogger  logger  )  [inline]
 

Definition at line 1125 of file Cluster.d.

References logger.

ILogger getLogger  )  [inline]
 

Definition at line 1135 of file Cluster.d.

References logger.

synchronized void addNode Node  node  )  [inline]
 

Add a node to the list of servers, and sort them such that all clients will have the same ordered set

Definition at line 1147 of file Cluster.d.

References Node::toString().

void optimize  )  [inline]
 

Definition at line 1163 of file Cluster.d.

synchronized void enable char[]  name,
ushort  port1,
ushort  port2
[inline]
 

Definition at line 1188 of file Cluster.d.

Referenced by Cluster::notify().

IPayload request ProtocolWriter  writer,
ProtocolReader  reader,
char[]  key = null
[inline]
 

Definition at line 1206 of file Cluster.d.

Referenced by Cluster::getCache(), Cluster::putCache(), and Cluster::putQueue().

final Node selectNode uint  index  )  [inline, private]
 

Select a cluster server based on a starting index. If the selected server is not currently enabled, we just try the next one. This behaviour should be consistent across each cluster client.

Definition at line 1226 of file Cluster.d.

References Node::isEnabled().

Referenced by Cluster::loadCache().

Node selectNode char[]  key = null  )  [inline, private]
 

Select a cluster server based on the specified key. If the selected server is not currently enabled, we just try the next one. This behaviour should be consistent across each cluster client.

Definition at line 1256 of file Cluster.d.

bool scan bool(*)(Node dg  )  [inline, private]
 

Sweep the cluster servers. Returns true if the delegate returns true, false otherwise. The sweep is aborted when the delegate returns true. Note that this scans nodes in a randomized pattern, which should tend to avoid 'bursty' activity by a set of clients upon any one cluster server.

Definition at line 1277 of file Cluster.d.

References Node::isEnabled(), and Node.

Referenced by Cluster::getQueue().


Member Data Documentation

HashMap map [private]
 

Definition at line 1116 of file Cluster.d.

Node [] nodes [private]
 

Definition at line 1117 of file Cluster.d.

Node [] random [private]
 

Definition at line 1118 of file Cluster.d.

ILogger logger [private]
 

Definition at line 1119 of file Cluster.d.


The documentation for this class was generated from the following file:
Generated on Fri May 27 18:12:02 2005 for Mango by  doxygen 1.4.0