Class AbstractDataStore

java.lang.Object
org.codelibs.fess.ds.AbstractDataStore
All Implemented Interfaces:
DataStore

public abstract class AbstractDataStore extends Object implements DataStore
The abstract class for DataStore.
  • Field Details

    • SCRIPT_TYPE

      protected static final String SCRIPT_TYPE
      The script type.
      See Also:
    • mimeType

      public String mimeType
      The mime type.
    • alive

      protected volatile boolean alive
      The 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

      protected abstract String getName()
      Get the name of this data store.
      Returns:
      The name of this data store.
    • stop

      public void stop()
      Description copied from interface: DataStore
      Stop the data store.
      Specified by:
      stop in interface DataStore
    • store

      public void store(org.codelibs.fess.opensearch.config.exentity.DataConfig config, IndexUpdateCallback callback, DataStoreParams initParamMap)
      Description copied from interface: DataStore
      Store the data.
      Specified by:
      store in interface DataStore
      Parameters:
      config - The data configuration.
      callback - The callback.
      initParamMap - The initial parameters.
    • getScriptType

      protected String getScriptType(DataStoreParams paramMap)
      Get the script type.
      Parameters:
      paramMap - The parameters.
      Returns:
      The script type.
    • convertValue

      protected Object convertValue(String scriptType, String template, Map<String,Object> paramMap)
      Convert the value.
      Parameters:
      scriptType - The script type.
      template - The template.
      paramMap - The parameters.
      Returns:
      The converted value.
    • getReadInterval

      protected long getReadInterval(DataStoreParams paramMap)
      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.