com.neeve.stats
Interface IStats

All Known Subinterfaces:
IAepBusManagerStats, IAepEngineStats, IEventMultiplexerStats, IRogLogStats, IStoreBindingStats, IStorePersisterStats, IStoreReplicatorStats, IStoreSenderStats, IStoreWriterStats, QueryStats
All Known Implementing Classes:
AepBusManagerStats, Stats

public interface IStats

Root statistics interface.

Various X entities collect runtime statistical information during their lifetime. This information is stored in class specific statistics classes and retrieved using class specific statistics interfaces. This interface serves as the root interface for such statistics interfaces.

Each statistics object is associated with a type and a name that uniquely identifies the object within its type. Objects of the same type export the same statistical information and can be accessed using the same interface. The name that uniquely identifies a statistics object in the statistics registry is constructed using the object type and name.

Threading:
A statistics object is not safe for concurrent access by multiple threads.

Nested Class Summary
static interface IStats.Counter
          Interface used to collect and provide access to a monotonically increasing counter.
static interface IStats.Gauge
          Interface used to collect an instantaneous value.
static interface IStats.Latencies
          Represents an IStats.Series used to collect latency timings.
static interface IStats.Series
          Interface used to collect series data points.
 
Method Summary
 void close()
          Close the statistics object This method closes the statistics object.
 void get(StringBuilder sb)
          Get a snapshot of the statistics information in string format
 String getLogger()
          Get the name of the logger attached to the statistical object.
 String getName()
          Get the name of the statistics object.
 String getType()
          Get the type of the statistics object.
 void startPeriodicOutput(int interval)
          Start outputting statistics on a periodic basis.
 void stopPeriodicOutput()
          Stop outputting statistics.
 

Method Detail

getType

String getType()
Get the type of the statistics object.

Returns:
Returns the type of the statistics object.

Each statistics object in a Neeve application is of a specific type Objects of the same type export the same statistics information and can be accessed using the same interface. This method returns the type of a statistics object. A statistics objects name and type are used to construct the name that uniquely identifies the object in the statistics registry.

See Also:
getName(), StatsRegistry
Threading:
This method is safe for concurrent access by multiple threads and can be invoked concurrently with other methods in this class.

getName

String getName()
Get the name of the statistics object.

Returns:
Returns the name of the statistics object.

Each statistics object in a Neeve application is uniquely identified by a name within its type. This method returns the name of a statistics object. A statistics objects name and type are used to construct the name that uniquely identifies the object in the statistics registry.

See Also:
getType(), StatsRegistry
Threading:
This method is safe for concurrent access by multiple threads and can be invoked concurrently with other methods in this class.

getLogger

String getLogger()
Get the name of the logger attached to the statistical object.

Returns:
Returns the name of the logger.

Each statistics object contains a tracer object used by the outputter thread started by startPeriodicOutput(int). The tracer object is bound to the logger whose name is returned by this method. The user can configure the logger with the name returned from this method to redirect the statistics output to a destination of choice.

Threading:
This method is safe for concurrent access by multiple threads and can be invoked concurrently with other methods in this class.

startPeriodicOutput

void startPeriodicOutput(int interval)
Start outputting statistics on a periodic basis.

Parameters:
interval - The periodic interval, in seconds, at which the statistics information is output.
Threading:
This method is not safe for concurrent access by multiple threads

get

void get(StringBuilder sb)
Get a snapshot of the statistics information in string format

Parameters:
sb - The stringbuilder object to append the statistics string.
See Also:
startPeriodicOutput(int)
Threading:
This method is safe for concurrent acces by multiple threads.

This method returns a snapshot of the statistics information stored in the object in string format. The method is called periodically by the statistics outputter thread if started. The string is then output to the statistics tracer. The method is also available to users of the statistics object other than the statistics outputter.


stopPeriodicOutput

void stopPeriodicOutput()
Stop outputting statistics.

Threading:
This method is not safe for concurrent access by multiple threads

close

void close()
Close the statistics object

This method closes the statistics object. It shuts down the outputter thread if started and removes the object from the registry

Threading:
This method is not safe for concurrent access by multiple threads


Copyright © 2016 Neeve Research, LLC. All Rights Reserved.