Top Description Fields Constructors Methods
net.sf.ehcache.util.counter.sampled

public Class TimeStampedCounterValue

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
java.io.Serializable

A counter value at a particular time instance
Author
Abhishek Sanoujam
Since
1.7

Field Summary

Modifier and TypeField and Description
private final long
private final long

Constructor Summary

AccessConstructor and Description
public
TimeStampedCounterValue(long timestamp, long value)

Constructor accepting the value of both timestamp and the counter value.

Method Summary

Modifier and TypeMethod and Description
public long

Returns:

The counter value
getCounterValue
()

Get the counter value

public long

Returns:

the timestamp associated with the current value
getTimestamp
()

Get value of the timestamp

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

counterValueback to summary
private final long counterValue
timestampback to summary
private final long timestamp

Constructor Detail

TimeStampedCounterValueback to summary
public TimeStampedCounterValue(long timestamp, long value)

Constructor accepting the value of both timestamp and the counter value.

Method Detail

getCounterValueback to summary
public long getCounterValue()

Get the counter value

Returns:long

The counter value

getTimestampback to summary
public long getTimestamp()

Get value of the timestamp

Returns:long

the timestamp associated with the current value

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override