static class GenericKeyedObjectPool.ObjectTimestampPair<T>
extends java.lang.Object
implements java.lang.Comparable<T>
GenericObjectPool
.Modifier and Type | Field and Description |
---|---|
(package private) long |
tstamp
Deprecated.
this field will be made private and final in version 2.0
|
(package private) T |
value
Deprecated.
this field will be made private and final in version 2.0
|
Constructor and Description |
---|
ObjectTimestampPair(T val)
Create a new ObjectTimestampPair using the given object and the current system time.
|
ObjectTimestampPair(T val,
long time)
Create a new ObjectTimeStampPair using the given object and timestamp value.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(GenericKeyedObjectPool.ObjectTimestampPair<T> other)
Compares this to another ObjectTimestampPair, using the timestamp as basis for comparison.
|
int |
compareTo(java.lang.Object obj)
Compares this to another object by casting the argument to an
ObjectTimestampPair.
|
long |
getTstamp() |
T |
getValue() |
java.lang.String |
toString()
Returns a string representation.
|
@Deprecated T value
@Deprecated long tstamp
ObjectTimestampPair(T val)
val
- object instanceObjectTimestampPair(T val, long time)
val
- object instancetime
- long representation of timestamppublic java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(java.lang.Object obj)
compareTo
in interface java.lang.Comparable<T>
obj
- object to cmparepublic int compareTo(GenericKeyedObjectPool.ObjectTimestampPair<T> other)
other
- object to comparepublic T getValue()
public long getTstamp()