public abstract class Memoizer<A,V> extends Object implements Computable<A,V>
FutureTaskto force synchronization only on tasks waiting for the same computation. This is based on Java Concurrency in Practice, page 108.
Concrete implementations MUST provide a means to limit the size of the
cache. Because the
cache is unbounded, it will just take on
more and more memory as new results are computed. This could be handled by
imposing a capacity constraint on the cache, by the use of
WeakReferences if they can be made to stand for the specific
computation to be performed, or by the use of a timeout on the cache entries.
|Modifier and Type||Field and Description|
Cache accumulates results.
Copyright © 2006–2016 SYSTAP, LLC DBA Blazegraph. All rights reserved.