Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | 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 929 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 946 of file Cluster.d.

References logger.

void setCache InternetAddress  address  )  [inline]
 

Add a cache/queue reference for the remote node

Definition at line 958 of file Cluster.d.

void setTasks InternetAddress  address  )  [inline]
 

Add a cache-loader reference for the remote node

Definition at line 970 of file Cluster.d.

char [] toString  )  [inline]
 

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

Definition at line 981 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 993 of file Cluster.d.

bool isEnabled  )  [inline]
 

Get the current state of this node

Definition at line 1006 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 1018 of file Cluster.d.

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 1039 of file Cluster.d.

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

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


Member Data Documentation

char [] name [private]
 

Definition at line 931 of file Cluster.d.

char [] port [private]
 

Definition at line 931 of file Cluster.d.

ILogger logger [private]
 

Definition at line 933 of file Cluster.d.

bool enabled [private]
 

Definition at line 934 of file Cluster.d.

ConnectionPool tasks [private]
 

Definition at line 936 of file Cluster.d.

Referenced by Cluster::loadCache().

ConnectionPool cache [private]
 

Definition at line 936 of file Cluster.d.

Referenced by Cluster::getQueue().


The documentation for this class was generated from the following file:
Generated on Mon Nov 14 10:59:58 2005 for Mango by  doxygen 1.4.0