Package com.metsci.glimpse.core.support
Class PainterCache<K,V>
- java.lang.Object
-
- com.metsci.glimpse.core.support.PainterCache<K,V>
-
public class PainterCache<K,V> extends Object
Provides one way of asynchronously computing a long-running task for painting. For example:public class MyPainter extends GlimpsePainterBase { int paintFrame; PaintingCache<Integer, V> cache; public MyPainter( ) { paintFrame = -1; cache = new PaintingCache<>( this::computeForFrame ); }- Author:
- borkholder
-
-
Field Summary
Fields Modifier and Type Field Description static ExecutorSHARED_EXEC
-
Constructor Summary
Constructors Constructor Description PainterCache(Function<K,V> computeF)PainterCache(Function<K,V> computeF, Executor executor)
-
-
-
Field Detail
-
SHARED_EXEC
public static Executor SHARED_EXEC
-
-