The cluster API gives programmatic access to the cluster channel that may be configured between two instances of a Transformer.
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 |
Return this system's node index within the cluster.
- Returns
- The node index
cluster.nodeisup |
( |
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 |
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 |
Get the number of nodes in the cluster.
- Returns
- The number of nodes in the cluster.