com.jrockit.memleak
Interface IResult<V>

Type Parameters:
V -
All Known Subinterfaces:
ITruncatable<T>
All Known Implementing Classes:
AbstractMemLeak.DelayedResult, AbstractMemLeak.DelayedTruncatable, AbstractMemLeak.VoidResult, ExceptionResult, KnownResult, KnownTruncatable, MemLeakR26.LargestArrayR26, MemLeakR28.GetInstanceRelationshipsR28, MemLeakR28.LargestArrayR28

public interface IResult<V>

Result wrapper in many ways similar to Future.

Author:
mpersson

Method Summary
 V get()
          The actual result.
 long getChangeTime()
          Get the time stamp of when this result last changed state.
 boolean isDone()
          Returns true if this task completed.
 boolean isDone(java.lang.Object notificationToken)
          Checks if the result is available.
 

Method Detail

isDone

boolean isDone()
Returns true if this task completed. Completion may be due to normal termination, an exception, or cancellation -- in all of these cases, this method will return true.

Returns:
true if this task completed.

isDone

boolean isDone(java.lang.Object notificationToken)
Checks if the result is available. If so, simply returns true. Otherwise, notificationToken is added to the token set that will be given to notification listeners once the result is available. And false is returned.

Parameters:
notificationToken -
Returns:
true if this task completed.

getChangeTime

long getChangeTime()
Get the time stamp of when this result last changed state. In other words: If isDone() is false, returns the time when the request was sent. If isDone() is true, returns the time when the response was received.

Returns:
a time stamp (in milliseconds since 1970-01-01)

get

V get()
      throws GarbageCollectedException,
             SpiException
The actual result.

Returns:
the result.
Throws:
GarbageCollectedException
SpiException


Copyright © 1999, 2011, Oracle and/or its affiliates. All rights reserved.