|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jrockit.memleak.value.KnownTruncatable<T>
T - the element typepublic class KnownTruncatable<T>
An implementation of ITruncatable for known results. (Custom
ITruncatable implementations may also be used for asynchronous
results, similar to Future.)
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.jrockit.memleak.ITruncatable |
|---|
ITruncatable.Reason |
| Constructor Summary | |
|---|---|
KnownTruncatable(T[] result)
Create a new KnownTruncatable, not truncated. |
|
KnownTruncatable(T[] result,
java.lang.Exception exception)
Create a new KnownTruncatable, possibly truncated. |
|
KnownTruncatable(T[] result,
ITruncatable.Reason reason)
Create a new KnownTruncatable, possibly truncated. |
|
| Method Summary | |
|---|---|
T[] |
get()
The actual result array, possibly truncated. |
long |
getChangeTime()
Get the time stamp of when this result last changed state. |
java.lang.Exception |
getException()
If an exception was thrown, returns that Exception. |
ITruncatable.Reason |
getTruncationReason()
If the result was truncated, returns a ITruncatable.Reason for the truncation. |
boolean |
isDone()
Returns true if this task completed. |
boolean |
isDone(java.lang.Object notificationToken)
Checks if the result is available. |
boolean |
isTruncated()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public KnownTruncatable(T[] result)
result - the result array, never null
public KnownTruncatable(T[] result,
ITruncatable.Reason reason)
result - the result array, never nullreason - reason for truncating the result, or null if not truncated
public KnownTruncatable(T[] result,
java.lang.Exception exception)
result - the result array, never nullexception - reason for truncating the result, or null if not truncated| Method Detail |
|---|
public long getChangeTime()
IResultIResult.isDone() is false, returns the time when the request
was sent. If IResult.isDone() is true, returns the time when the
response was received.
getChangeTime in interface IResult<T[]>public boolean isDone()
IResult
isDone in interface IResult<T[]>public boolean isDone(java.lang.Object notificationToken)
IResultnotificationToken is added to the token set that will be
given to notification listeners once the result is available. And false
is returned.
isDone in interface IResult<T[]>public T[] get()
ITruncatable
get in interface IResult<T[]>get in interface ITruncatable<T>public boolean isTruncated()
isTruncated in interface ITruncatable<T>public ITruncatable.Reason getTruncationReason()
ITruncatableITruncatable.Reason for the truncation.
Otherwise, null is returned. Note that if ITruncatable.getException()
returns non-null, this method will also return non-null, most probably
ITruncatable.Reason.EXCEPTION.
getTruncationReason in interface ITruncatable<T>public java.lang.Exception getException()
ITruncatableException. Otherwise,
null is returned.
getException in interface ITruncatable<T>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||