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

Node Class Reference

List of all members.

Public Member Functions

 this (ILogger logger, char[] name)
void setCache (InternetAddress address)
void setTasks (InternetAddress address)
char[] toString ()
void fail ()
bool isEnabled ()
void setEnabled (bool enabled)
bool request (ConnectionPool pool, ProtocolWriter writer, ProtocolReader reader, out IPayload payload)

Private Attributes

char[] name
char[] port
ILogger logger
bool enabled
ConnectionPool tasks
ConnectionPool cache

Detailed Description

Class to represent a cluster node. Each node supports both cache and queue functionality. Note that the set of available nodes is configured at startup, simplifying the discovery process in some significant ways, and causing less thrashing of cache-keys.

Definition at line 925 of file Cluster.d.


Member Function Documentation

this ILogger  logger,
char[]  name
[inline]
 

Construct a node with the provided name. This name should be the network name of the hosting device.

Definition at line 942 of file Cluster.d.

References logger.

void setCache InternetAddress  address  )  [inline]
 

Add a cache/queue reference for the remote node

Definition at line 954 of file Cluster.d.

void setTasks InternetAddress  address  )  [inline]
 

Add a cache-loader reference for the remote node

Definition at line 966 of file Cluster.d.

char [] toString  )  [inline]
 

Return the name of this node (the network name of the device)

Definition at line 977 of file Cluster.d.

Referenced by NodeSet::addNode().

void fail  )  [inline]
 

Remove this Node from the cluster. The node is disabled until it is seen to recover.

Definition at line 989 of file Cluster.d.

References ConnectionPool::close(), setEnabled(), and tasks.

Referenced by request().

bool isEnabled  )  [inline]
 

Get the current state of this node

Definition at line 1002 of file Cluster.d.

Referenced by NodeSet::scan(), and NodeSet::selectNode().

void setEnabled bool  enabled  )  [inline]
 

Set the enabled state of this node

Definition at line 1014 of file Cluster.d.

Referenced by fail().

bool request ConnectionPool  pool,
ProtocolWriter  writer,
ProtocolReader  reader,
out IPayload  payload
[inline]
 

request data; fail this Node if we can't connect. Note that we make several attempts to connect before writing the node off as a failure.

Definition at line 1035 of file Cluster.d.

References ConnectionPool::borrow(), Connection::done(), fail(), ProtocolWriter::flush(), Connection::getConduit(), ProtocolReader::getPayload(), Connection::reset(), and time.

Referenced by Cluster::getQueue(), and Cluster::loadCache().


Member Data Documentation

char [] name [private]
 

Definition at line 927 of file Cluster.d.

char [] port [private]
 

Definition at line 927 of file Cluster.d.

ILogger logger [private]
 

Definition at line 929 of file Cluster.d.

Referenced by this().

bool enabled [private]
 

Definition at line 930 of file Cluster.d.

ConnectionPool tasks [private]
 

Definition at line 932 of file Cluster.d.

Referenced by fail(), and Cluster::loadCache().

ConnectionPool cache [private]
 

Definition at line 932 of file Cluster.d.

Referenced by Cluster::getQueue().


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