Packagenet.user1.reactor.snapshot
Classpublic class UPCStatsSnapshot
InheritanceUPCStatsSnapshot Inheritance Snapshot Inheritance flash.events.EventDispatcher

Since : Reactor 1.1.0

The UPCStatsSnapshot class is used to retrieve statistics about the UPC messages that have been processed or are waiting to be processed by Union Server. For example,
   // Create the snapshot
   var snapshot:UPCStatsSnapshot = new UPCStatsSnapshot();
   
   // Register a callback function
   snapshot.onLoad = function ():void { 
     trace("The server currently has " 
     + snapshot.getNumUPCsInQueue() + " UPC messages waiting to be"
     + " processed.");
   }
   
   // Or register a listener function
   snapshot.addEventListener(SnapshotEvent.LOAD, loadListener);
   function loadListener (e:SnapshotEvent):void {
     var loadedSnapshot:UPCStatsSnapshot = UPCStatsSnapshot(e.target);
     trace("The server currently has " 
     + loadedSnapshot.getNumUPCsInQueue() + " UPC messages waiting to be"
     + " processed.");
   }
   
   // Load the UPC stats by passing the snapshot object to
   // Reactor's updateSnapshot() method:
   reactor.updateSnapshot(snapshot);
   

See also

SnapshotEvent
Snapshot
net.user1.reactor.Reactor.updateSnapshot()


Public Variables
 VariableDefined By
 InheritedonLoad : Function
A callback function to be invoked when this snapshot's data is loaded.
Snapshot
Public Methods
 MethodDefined By
  
Constructor
UPCStatsSnapshot
  
Returns the amount of time the most-recently processed message spent in the message queue before being processed.
UPCStatsSnapshot
  
Returns a list of the messages that took the longest amount of time to process since the server started.
UPCStatsSnapshot
  
Returns the number of UPC messages currently waiting to be processed by Union Server.
UPCStatsSnapshot
 Inherited
getStatus():String
Returns the status of the most recent snapshot load-operation.
Snapshot
  
Returns the total number of UPC messages Union Server has processed since the server started.
UPCStatsSnapshot
 Inherited
Indicates whether the snapshot is currently loading data.
Snapshot
Events
 Event Summary Defined By
 Inherited Dispatched when a snapshot object has been updated in response to an earlier call to Reactor's updateSnapshot() method.Snapshot
 Inherited Dispatched when the result of an update request has been received by a snapshot object.Snapshot
Constructor Description
UPCStatsSnapshot()Constructor
public function UPCStatsSnapshot()

Constructor

Method Descriptions
getLastQueueWaitTime()method
public function getLastQueueWaitTime():int

Since : Reactor 1.1.0

Returns the amount of time the most-recently processed message spent in the message queue before being processed. To refresh this value to reflect the latest state of the server, pass this UPCStatsSnapshot object to Reactor's updateSnapshot() method.

Returns
int

See also

getLongestUPCProcesses()method 
public function getLongestUPCProcesses():Array

Since : Reactor 1.1.0

Returns a list of the messages that took the longest amount of time to process since the server started. To refresh this value to reflect the latest state of the server, pass this UPCStatsSnapshot object to Reactor's updateSnapshot() method.

Returns
Array

See also

getNumUPCsInQueue()method 
public function getNumUPCsInQueue():int

Since : Reactor 1.1.0

Returns the number of UPC messages currently waiting to be processed by Union Server. To refresh this value to reflect the latest state of the server, pass this UPCStatsSnapshot object to Reactor's updateSnapshot() method.

Returns
int

See also

getTotalUPCsProcessed()method 
public function getTotalUPCsProcessed():int

Since : Reactor 1.1.0

Returns the total number of UPC messages Union Server has processed since the server started. To refresh this value to reflect the latest state of the server, pass this UPCStatsSnapshot object to Reactor's updateSnapshot() method.

Returns
int

See also