GigaSpaces XAP 9.1 API

com.j_spaces.core.filters
Class StatisticsContext

java.lang.Object
  extended by com.j_spaces.core.filters.StatisticsContext
All Implemented Interfaces:
Externalizable, Serializable

public class StatisticsContext
extends Object
implements Externalizable

Representation of an operation statistics object.

Version:
4.1
Author:
Michael Konnikov
See Also:
StatisticsAdmin, Serialized Form

Constructor Summary
StatisticsContext()
          Empty constructor.
 
Method Summary
 double getAverage()
          The average calculated on the last time according to the statistics sampling rate.
 long getCurrentCount()
          Current count of operations.
 void readExternal(ObjectInput in)
          
 void setCurrentCount(AtomicLong currentCount)
          set current count
 String toString()
          String representation of the statistics.
 void writeExternal(ObjectOutput out)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StatisticsContext

public StatisticsContext()
Empty constructor.

Method Detail

getAverage

public double getAverage()
The average calculated on the last time according to the statistics sampling rate.

Returns:
the average of operation per second.
See Also:
StatisticsAdmin.getStatisticsSamplingRate()

getCurrentCount

public long getCurrentCount()
Current count of operations.

Returns:
the count of operations

toString

public String toString()
String representation of the statistics. For example: count: 1010, average time (ms): 3.2

Overrides:
toString in class Object
Returns:
the string representation

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException

Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException

Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

setCurrentCount

public void setCurrentCount(AtomicLong currentCount)
set current count

Parameters:
currentCount -

GigaSpaces XAP 9.1 API

Copyright © GigaSpaces.