Package dap4.servlet
Class DapCache
- java.lang.Object
-
- dap4.servlet.DapCache
-
public abstract class DapCache extends Object
Provide an LRU cache of DSPs. It is expected (for now) that this is only used on the server side. The cache key is assumed to be the DSP object. The cache is synchronized to avoid race conditions. Note that we do not have to release because Java uses garbage collection and entries will be purged if the LRU cache is full. Singleton class
-
-
Field Summary
Fields Modifier and Type Field Description static dap4.core.data.DSPRegistrydspregistryDefine a map of known DSP classes.protected static DSPFactoryfactoryprotected static List<dap4.core.data.DSP>lruDefine an lru cache of known DSP objects: oldest first.static StringMATCHMETHOD
-
Constructor Summary
Constructors Constructor Description DapCache()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidflush()static DSPFactorygetFactory()static dap4.core.data.DSPopen(String path, dap4.core.util.DapContext cxt)static voidsetFactory(DSPFactory f)
-
-
-
Field Detail
-
MATCHMETHOD
public static final String MATCHMETHOD
- See Also:
- Constant Field Values
-
dspregistry
public static dap4.core.data.DSPRegistry dspregistry
Define a map of known DSP classes.
-
lru
protected static List<dap4.core.data.DSP> lru
Define an lru cache of known DSP objects: oldest first.
-
factory
protected static DSPFactory factory
-
-
Method Detail
-
setFactory
public static void setFactory(DSPFactory f)
-
getFactory
public static DSPFactory getFactory()
-
open
public static dap4.core.data.DSP open(String path, dap4.core.util.DapContext cxt) throws IOException
- Throws:
IOException
-
-