Package org.codelibs.fess.ds
Class AbstractDataStore
java.lang.Object
org.codelibs.fess.ds.AbstractDataStore
- All Implemented Interfaces:
DataStore
The abstract class for DataStore.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanThe flag to check if the data store is alive.The mime type.protected static final StringThe script type. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectConvert the value.protected abstract StringgetName()Get the name of this data store.protected longgetReadInterval(DataStoreParams paramMap) Get the read interval.protected StringgetScriptType(DataStoreParams paramMap) Get the script type.voidregister()Register this data store.protected voidsleep(long interval) Sleep for the specified interval.voidstop()Stop the data store.voidstore(org.codelibs.fess.opensearch.config.exentity.DataConfig config, IndexUpdateCallback callback, DataStoreParams initParamMap) Store the data.protected abstract voidstoreData(org.codelibs.fess.opensearch.config.exentity.DataConfig dataConfig, IndexUpdateCallback callback, DataStoreParams paramMap, Map<String, String> scriptMap, Map<String, Object> defaultDataMap) Store the data.
-
Field Details
-
SCRIPT_TYPE
The script type.- See Also:
-
mimeType
The mime type. -
alive
protected volatile boolean aliveThe flag to check if the data store is alive. Volatile to ensure visibility across threads.
-
-
Constructor Details
-
AbstractDataStore
public AbstractDataStore()Default constructor.
-
-
Method Details
-
register
public void register()Register this data store. -
getName
Get the name of this data store.- Returns:
- The name of this data store.
-
stop
public void stop()Description copied from interface:DataStoreStop the data store. -
store
public void store(org.codelibs.fess.opensearch.config.exentity.DataConfig config, IndexUpdateCallback callback, DataStoreParams initParamMap) Description copied from interface:DataStoreStore the data. -
getScriptType
Get the script type.- Parameters:
paramMap- The parameters.- Returns:
- The script type.
-
convertValue
Convert the value.- Parameters:
scriptType- The script type.template- The template.paramMap- The parameters.- Returns:
- The converted value.
-
getReadInterval
Get the read interval.- Parameters:
paramMap- The parameters.- Returns:
- The read interval.
-
sleep
protected void sleep(long interval) Sleep for the specified interval.- Parameters:
interval- The interval.
-
storeData
protected abstract void storeData(org.codelibs.fess.opensearch.config.exentity.DataConfig dataConfig, IndexUpdateCallback callback, DataStoreParams paramMap, Map<String, String> scriptMap, Map<String, Object> defaultDataMap) Store the data.- Parameters:
dataConfig- The data configuration.callback- The callback.paramMap- The parameters.scriptMap- The script map.defaultDataMap- The default data map.
-