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 |
Definition at line 1118 of file Cluster.d.
|
|
|
|
|
Add a node to the list of servers, and sort them such that all clients will have the same ordered set Definition at line 1151 of file Cluster.d. References Node::toString(). |
|
|
|
Definition at line 1192 of file Cluster.d. Referenced by Cluster::notify(). |
|
Definition at line 1210 of file Cluster.d. Referenced by Cluster::getCache(), Cluster::putCache(), and Cluster::putQueue(). |
|
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 1230 of file Cluster.d. References Node::isEnabled(). Referenced by Cluster::loadCache(). |
|
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. |
|
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 1281 of file Cluster.d. References Node::isEnabled(), and Node. Referenced by Cluster::getQueue(). |
|
|
|
|
|
|
|
|