Package | net.user1.reactor.snapshot |
Class | public class NodeListSnapshot |
Inheritance | NodeListSnapshot ![]() ![]() |
Since : | Reactor 2.0.0 |
// Create a snapshot of node IDs var snapshot:NodeListSnapshot = new NodeListSnapshot(); // Register a callback function snapshot.onLoad = function ():void { trace("Here is the node list: " + snapshot.getNodeList()); } // Or register a listener function snapshot.addEventListener(SnapshotEvent.LOAD, loadListener); function loadListener (e:SnapshotEvent):void { var snapshot:NodeListSnapshot = NodeListSnapshot(e.target); trace("Here is the node list: " + snapshot.getNodeList()); } // Load the node list by passing the snapshot object to // Reactor's updateSnapshot() method: reactor.updateSnapshot(snapshot);
The list of node IDs retrieved by NodeListSnapshot is a one-time snapshot of the state of the server, and is not kept up to date after it is loaded. To update a NodeListSnapshot object to match latest the state of the server, pass that object to Reactor's updateSnapshot() method.
See also
Method | Defined By | ||
---|---|---|---|
Constructor
| NodeListSnapshot | ||
getNodeList():Array
Returns an array of the node IDs for the Union Server nodes
connected to the current server. | NodeListSnapshot | ||
![]() | getStatus():String
Returns the status of the most recent snapshot load-operation. | Snapshot | |
![]() | updateInProgress():Boolean
Indicates whether the snapshot is currently loading data. | Snapshot |
NodeListSnapshot | () | Constructor |
public function NodeListSnapshot()
Constructor
getNodeList | () | method |
public function getNodeList():Array
Since : | Reactor 2.0.0 |
Returns an array of the node IDs for the Union Server nodes connected to the current server.
ReturnsArray |