public final class SampleStatistics extends Object implements VendorExtensions, Serializable
Constructor and Description |
---|
SampleStatistics()
Create a new
SampleStatistics object for containing statistical
information for a sample-type usage parameter in the case where no samples
have been counted yet. |
SampleStatistics(long sampleCount,
long min,
long max,
double mean)
Create a new
SampleStatistics object containing statistical
information for a sample-type usage parameter. |
Modifier and Type | Method and Description |
---|---|
static void |
disableVendorDataDeserialization()
Disable the deserialization of vendor-specific data for objects of this class.
|
static void |
disableVendorDataSerialization()
Disable the serialization of vendor-specific data for objects of this class.
|
static void |
enableVendorDataDeserialization()
Enable the deserialization of vendor-specific data for objects of this class.
|
static void |
enableVendorDataSerialization()
Enable the serialization of vendor-specific data for objects of this class.
|
long |
getMaximum()
Get the maximum sample value recorded for the usage parameter since either the service
was deployed or the usage parameter was last reset (whichever occurred most recently).
|
double |
getMean()
Get the mean of sample values recorded for the usage parameter since either the service
was deployed or the usage parameter was last reset (whichever occurred most recently).
|
long |
getMinimum()
Get the minimum sample value recorded for the usage parameter since either the service
was deployed or the usage parameter was last reset (whichever occurred most recently).
|
long |
getSampleCount()
Get the number of samples recorded for the usage parameter since either the service
was deployed or the usage parameter was last reset (whichever occurred most recently).
|
Object |
getVendorData()
Get the vendor-specific data.
|
void |
setVendorData(Object vendorData)
Set the vendor-specific data.
|
String |
toString() |
public SampleStatistics()
SampleStatistics
object for containing statistical
information for a sample-type usage parameter in the case where no samples
have been counted yet.
This constructor is equivalent to SampleStatistics(0, Long.MAX_VALUE, Long.MIN_VALUE, 0.0)
.
public SampleStatistics(long sampleCount, long min, long max, double mean)
SampleStatistics
object containing statistical
information for a sample-type usage parameter.sampleCount
- the number of samples recorded for the usage parameter.min
- the minimum sample value recorded.max
- the maximum sample value recorded.mean
- the mean of the sample values recorded.public long getSampleCount()
public long getMinimum()
Long.MAX_VALUE
if no samples have yet been recorded.public long getMaximum()
Long.MIN_VALUE
if no samples have yet been recorded.public double getMean()
public static void enableVendorDataSerialization()
By default, any vendor-specific data included in an object of this class will not be included in the serialization stream when the object is serialized. Invoking this method changes this behavior so that vendor-specific data is included in the serialization stream when an object of this class is serialized.
This method should only be invoked if the vendor-specific data is serializable via standard Java serialization means.
disableVendorDataSerialization()
,
setVendorData(java.lang.Object)
public static void disableVendorDataSerialization()
If the serialization of vendor-specific data for objects of this class has
been enabled via the enableVendorDataSerialization()
method, this
method disables that behavior again.
public static void enableVendorDataDeserialization()
By default, any vendor-specific data included in the serialization stream of objects of this class is discarded upon deserialization. Invoking this method changes that behavior so that the vendor-specific data is also deserialized when an object of this class is deserialized. A management client that enables the deserialization of vendor-specific data must ensure that any necessary classes required to deserialize that data is available in the relevant classloader.
disableVendorDataDeserialization()
,
getVendorData()
public static void disableVendorDataDeserialization()
If the deserialization of vendor-specific data for objects of this class has
been enabled via the enableVendorDataDeserialization()
method, this
method disables that behavior again.
public void setVendorData(Object vendorData)
setVendorData
in interface VendorExtensions
vendorData
- the vendor-specific data.public Object getVendorData()
getVendorData
in interface VendorExtensions