com.jrockit.memleak.util
Class LimitCache<T>
java.lang.Object
com.jrockit.memleak.util.LimitCache<T>
- Type Parameters:
T -
public abstract class LimitCache<T>
- extends java.lang.Object
Experimental to handle caching of data that depend on some limit and may change over time.
FIXME: Could replace limit type with parameter: >
- Author:
- mpersson
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LimitCache
public LimitCache()
get
public T get(long limit,
Policy policy)
throws GarbageCollectedException,
SpiException
- Parameters:
limit - policy -
- Returns:
- the cached value or null, according to policy
- Throws:
GarbageCollectedException
SpiException
isTooLimited
protected abstract boolean isTooLimited(T value,
long limit)
- Parameters:
value - limit -
- Returns:
- true if
value is more limited than it would be with
limit.
createResult
protected abstract IResult<T> createResult(long limit)
- Parameters:
limit -
- Returns:
- a newly created
result, likely pending.
Copyright © 1999, 2011, Oracle and/or its affiliates. All rights reserved.