Package com.comphenix.protocol.timing
Class OnlineComputation
java.lang.Object
com.comphenix.protocol.timing.OnlineComputation
- Direct Known Subclasses:
HistogramStream,StatisticsStream
Represents an online computation.
- Author:
- Kristian
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract OnlineComputationcopy()Construct a copy of the current online computation.abstract intgetCount()Retrieve the number of observations.abstract voidobserve(double value)Observe a value.static OnlineComputationsynchronizedComputation(OnlineComputation computation)Retrieve a wrapper for another online computation that is synchronized.
-
Constructor Details
-
OnlineComputation
public OnlineComputation()
-
-
Method Details
-
getCount
public abstract int getCount()Retrieve the number of observations.- Returns:
- Number of observations.
-
observe
public abstract void observe(double value)Observe a value.- Parameters:
value- - the observed value.
-
copy
Construct a copy of the current online computation.- Returns:
- The new copy.
-
synchronizedComputation
Retrieve a wrapper for another online computation that is synchronized.- Parameters:
computation- - the computation.- Returns:
- The synchronized wrapper.
-