com.jrockit.memleak
Class Policy.TokenPolicy

java.lang.Object
  extended by com.jrockit.memleak.Policy
      extended by com.jrockit.memleak.Policy.TokenPolicy
Enclosing class:
Policy

public static class Policy.TokenPolicy
extends Policy

Policy with a notification token.

Author:
mpersson

Nested Class Summary
 
Nested classes/interfaces inherited from class com.jrockit.memleak.Policy
Policy.TimeStampPolicy, Policy.TokenPolicy
 
Field Summary
 
Fields inherited from class com.jrockit.memleak.Policy
CACHED_OR_NULL, NOTHING_CACHED, PREFETCH_SOMETHING, SOMETHING
 
Constructor Summary
Policy.TokenPolicy(Policy delegate, java.lang.Object token)
           
 
Method Summary
protected  Policy createPrefetch()
          Create a new prefetching Policy.
<T> T
getAcceptable(IResult<T> result)
           
 boolean isDoneOrToken(IResult<?> result)
           
 
Methods inherited from class com.jrockit.memleak.Policy
derivedPrefetch, forToken, fromNow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Policy.TokenPolicy

public Policy.TokenPolicy(Policy delegate,
                          java.lang.Object token)
Parameters:
delegate -
token -
Method Detail

createPrefetch

protected Policy createPrefetch()
Description copied from class: Policy
Create a new prefetching Policy.

Returns:
the policy

getAcceptable

public <T> T getAcceptable(IResult<T> result)
                throws GarbageCollectedException,
                       SpiException
Returns:
the value or possibly null if the result is pending and this policy is non-blocking.
Throws:
GarbageCollectedException
SpiException

isDoneOrToken

public boolean isDoneOrToken(IResult<?> result)
Returns:
The result of result.isDone()


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