Package uk.ac.starlink.ttools.plot2.task
Class DataStoreParameter
java.lang.Object
uk.ac.starlink.task.Parameter<T>
uk.ac.starlink.task.AbstractChoiceParameter<T,T>
uk.ac.starlink.task.ChoiceParameter<DataStoreFactory>
uk.ac.starlink.ttools.plot2.task.DataStoreParameter
Parameter to control the way that plot data is cached prior to
performing one or more plots.
- Since:
- 1 Mark 2013
- Author:
- Mark Taylor
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DataStoreFactory
Memory-cached storage: data is first read into arrays in memory.static final DataStoreFactory
Smart disk-cached storage.static final DataStoreFactory
Smart memory-cached storage: like BASIC_CACHE but tries to spot non-varying columns etc for more efficient storage.static final DataStoreFactory
static final DataStoreFactory
Persistent cached storage in default scratch directory.static final DataStoreFactory
Smart cached storage based on the default Storage Policy.static final DataStoreFactory
Simple storage: data is read on demand from table every time.Fields inherited from class uk.ac.starlink.task.Parameter
BY_NAME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDefaultForCaching
(boolean isCachingSensible) Returns the default value for this parameter based on whether caching is believed to be a good idea.void
setDefaultCaching
(boolean caching) Sets whether caching generally is or is not advised.Methods inherited from class uk.ac.starlink.task.ChoiceParameter
getUsage, objectToString, setDefaultOption, setUsage, stringToObject
Methods inherited from class uk.ac.starlink.task.AbstractChoiceParameter
addOption, addOption, choiceToString, clearOptions, getName, getOption, getOptionNames, getOptions, getOptionValueList, stringifyOption, stringToChoice
Methods inherited from class uk.ac.starlink.task.Parameter
clearValue, getDescription, getName, getPosition, getPreferExplicit, getPrompt, getStringDefault, getValueClass, isNullPermitted, objectValue, setDescription, setDescription, setName, setNullPermitted, setPosition, setPreferExplicit, setPrompt, setStringDefault, setValue, setValueFromObject, setValueFromString, stringValue, toArray, toString
-
Field Details
-
SIMPLE
Simple storage: data is read on demand from table every time. -
BASIC_CACHE
Memory-cached storage: data is first read into arrays in memory. -
MEMORY_CACHE
Smart memory-cached storage: like BASIC_CACHE but tries to spot non-varying columns etc for more efficient storage. -
PARALLEL_MEMORY_CACHE
-
DISK_CACHE
Smart disk-cached storage. -
POLICY_CACHE
Smart cached storage based on the default Storage Policy. -
PERSISTENT_CACHE
Persistent cached storage in default scratch directory.
-
-
Constructor Details
-
DataStoreParameter
Constructor.- Parameters:
name
- parameter name
-
-
Method Details
-
setDefaultCaching
public void setDefaultCaching(boolean caching) Sets whether caching generally is or is not advised. This affects the default value of this parameter.- Parameters:
caching
- true if caching is likely to be a good strategy
-
getDefaultForCaching
Returns the default value for this parameter based on whether caching is believed to be a good idea.- Parameters:
isCachingSensible
- true if caching is likely to be a good strategy- Returns:
- best default option
-