|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jrockit.memleak.Policy
public abstract class Policy
Policy to control caching, prefetch, and synchronous behavior of Memleak remote operations.
The policy mainly affects operations in two ways:
Nested Class Summary | |
---|---|
static class |
Policy.TimeStampPolicy
A Policy only accepting values arriving after this point in time. |
static class |
Policy.TokenPolicy
Policy with a notification token. |
Field Summary | |
---|---|
static Policy |
CACHED_OR_NULL
Policy when you don't want any round trips, just the latest (if anything) already in the cache. |
static Policy |
NOTHING_CACHED
Policy when you don't want anything that is cached. |
static Policy |
PREFETCH_SOMETHING
Initiate prefetch if nothing is cached. |
static Policy |
SOMETHING
Policy when you just want something (non-null), but don't care if it is old. |
Constructor Summary | |
---|---|
protected |
Policy()
Internal constructor for subclasses. |
Method Summary | ||
---|---|---|
protected abstract Policy |
createPrefetch()
Create a new prefetching Policy. |
|
Policy |
derivedPrefetch()
|
|
static Policy.TokenPolicy |
forToken(java.lang.Object token)
Create a prefetch Policy.TokenPolicy that uses token to notify
when the result has arrived. |
|
static Policy.TimeStampPolicy |
fromNow()
Create a new Policy.TokenPolicy only accepting values arriving after this
point in time. |
|
|
getAcceptable(IResult<T> result)
|
|
boolean |
isDoneOrToken(IResult<?> result)
|
|
boolean |
requireNewerThan(IResult<?> result)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Policy CACHED_OR_NULL
public static final Policy SOMETHING
public static final Policy PREFETCH_SOMETHING
public static final Policy NOTHING_CACHED
Constructor Detail |
---|
protected Policy()
Method Detail |
---|
public static Policy.TimeStampPolicy fromNow()
Policy.TokenPolicy
only accepting values arriving after this
point in time. It is recommended that this is only used on explicit user
request, such as a refresh.
Policy.TimeStampPolicy
only accepting values from this point
in time.public static Policy.TokenPolicy forToken(java.lang.Object token)
Policy.TokenPolicy
that uses token
to notify
when the result has arrived.
token
-
Policy.TokenPolicy
INotificationService
protected abstract Policy createPrefetch()
public boolean requireNewerThan(IResult<?> result)
result
-
result
is needed.public <T> T getAcceptable(IResult<T> result) throws GarbageCollectedException, SpiException
T
- result
-
GarbageCollectedException
SpiException
public boolean isDoneOrToken(IResult<?> result)
result
-
result.isDone()
public Policy derivedPrefetch()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |