The cluster API gives programmatic access to the cluster channel that may be configured between two instances of a Transformer.
| cluster.getClusterSize |
( |
| ) |
|
Get the number of nodes in the cluster.
- Returns
- The number of nodes in the cluster.
Return this system's node index within the cluster.
- Returns
- The node index
| cluster.isNodeUp |
( |
var |
node | ) |
|
Query whether a node in a cluster is available.
- Parameters
-
- Return values
-
| 0 | - This node isn't available |
| 1 | - This node is available |
Query whether this node is primary.
- Return values
-
| 0 | - This node isn't primary |
| 1 | - This node is primary |
| nil | - if the fieldname is not known |
Reset the uptime for this node.
This may result in this node no longer being primary
| cluster.sendNodata |
( |
var |
name | ) |
|
Send an nodata message to all members of the cluster.
- Parameters
-
| cluster.sendNodataToNode |
( |
var |
node, |
|
|
var |
name, |
|
|
var |
flags |
|
) |
| |
Send an nodata message to a particular node in the cluster.
- Parameters
-
| node | - Node to send the message to |
| name | - Name of the symbol |
| flags | - Nodata flags |
| cluster.sendUpdate |
( |
var |
update | ) |
|
Send an update to all members of the cluster.
- Parameters
-
| update | - Update to distribute |
| cluster.sendUpdateToNode |
( |
var |
node, |
|
|
var |
update |
|
) |
| |
Send an update to a particular node in the cluster.
- Parameters
-
| node | - Node to send the update to |
| update | - Update to distribute |
| cluster.shouldProcess |
( |
var |
symbolname | ) |
|
Check if this node should process a packet.
- Parameters
-
| symbolname | - The packet subject |
- Return values
-
| 0 | - This node shouldn't process the packet |
| 1 | - This node should process the packet |