com.jrockit.memleak.mlp
Class AbstractMemLeak.VoidResult

java.lang.Object
  extended by com.jrockit.memleak.mlp.AbstractMemLeak.VoidResult
All Implemented Interfaces:
IResult<java.lang.Void>
Enclosing class:
AbstractMemLeak

protected class AbstractMemLeak.VoidResult
extends java.lang.Object
implements IResult<java.lang.Void>

IResult implementation that always returns null. Used to wait for completion, catching errors, or by sub classing to perform something when the request is completed.

Author:
mpersson

Constructor Summary
AbstractMemLeak.VoidResult()
           
AbstractMemLeak.VoidResult(int numRequests)
           
 
Method Summary
 java.lang.Void 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.
protected  void onCompletion()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMemLeak.VoidResult

public AbstractMemLeak.VoidResult()

AbstractMemLeak.VoidResult

public AbstractMemLeak.VoidResult(int numRequests)
Parameters:
numRequests -
Method Detail

getChangeTime

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

Specified by:
getChangeTime in interface IResult<java.lang.Void>
Returns:
a time stamp (in milliseconds since 1970-01-01)

isDone

public boolean isDone()
Description copied from interface: IResult
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.

Specified by:
isDone in interface IResult<java.lang.Void>
Returns:
true if this task completed.

isDone

public boolean isDone(java.lang.Object notificationToken)
Description copied from interface: IResult
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.

Specified by:
isDone in interface IResult<java.lang.Void>
Returns:
true if this task completed.

get

public java.lang.Void get()
                   throws GarbageCollectedException,
                          SpiException
Description copied from interface: IResult
The actual result.

Specified by:
get in interface IResult<java.lang.Void>
Returns:
null
Throws:
GarbageCollectedException
SpiException

onCompletion

protected void onCompletion()


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