org.gcube.opensearch.opensearchdatasource
Class OpenSearchDataSourceConfig

java.lang.Object
  extended by org.gcube.opensearch.opensearchdatasource.OpenSearchDataSourceConfig
All Implemented Interfaces:
org.globus.wsrf.jndi.Initializable

public class OpenSearchDataSourceConfig
extends java.lang.Object
implements org.globus.wsrf.jndi.Initializable

The configuration parameters of the OpenSearchDataSource

Author:
NKUA

Constructor Summary
OpenSearchDataSourceConfig()
           
 
Method Summary
 java.lang.Long getCacheRefreshIntervalMillis()
          The time interval between cache refresh cycles
 java.lang.Boolean getClearCacheOnStartup()
          Whether cache clear when first loading resources is enabled
 java.util.Map<java.lang.String,FactoryClassNamePair> getFactories()
          The namespace-to-factory class name mappings that the OpenSearch Library will use
 java.lang.String getOpenSearchLibraryFactories()
          The namespace-to-factory class name mappings that the OpenSearch Library will use, in string format
 void initialize()
          Called on initialization.
 void setCacheRefreshIntervalMillis(java.lang.Long cacheRefreshIntervalMillis)
          Sets the time interval between cache refresh cycles
 void setClearCacheOnStartup(java.lang.Boolean clearCacheOnStartup)
          Enables or disables cache clearing on startup
 void setOpenSearchLibraryFactories(java.lang.String openSearchLibraryFactories)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenSearchDataSourceConfig

public OpenSearchDataSourceConfig()
Method Detail

getClearCacheOnStartup

public java.lang.Boolean getClearCacheOnStartup()
Whether cache clear when first loading resources is enabled

Returns:
true if cache clear on startup is enabled, false otherwise

getCacheRefreshIntervalMillis

public java.lang.Long getCacheRefreshIntervalMillis()
The time interval between cache refresh cycles

Returns:
The time interval in milliseconds

getFactories

public java.util.Map<java.lang.String,FactoryClassNamePair> getFactories()
The namespace-to-factory class name mappings that the OpenSearch Library will use

Returns:
A Map containing all the mappings from OpenSearch extension namespaces to factory class name pairs

getOpenSearchLibraryFactories

public java.lang.String getOpenSearchLibraryFactories()
The namespace-to-factory class name mappings that the OpenSearch Library will use, in string format

Returns:
A Map containing all the mappings from OpenSearch extension namespaces to factory class name pairs

setClearCacheOnStartup

public void setClearCacheOnStartup(java.lang.Boolean clearCacheOnStartup)
Enables or disables cache clearing on startup

Parameters:
clearCacheOnStartup - true if cache clearing should be enabled, false otherwise

setCacheRefreshIntervalMillis

public void setCacheRefreshIntervalMillis(java.lang.Long cacheRefreshIntervalMillis)
Sets the time interval between cache refresh cycles

Parameters:
cacheRefreshIntervalMillis - The time interval in millisecods

setOpenSearchLibraryFactories

public void setOpenSearchLibraryFactories(java.lang.String openSearchLibraryFactories)

initialize

public void initialize()
                throws java.lang.Exception
Called on initialization. Parses openSearchLibraryFactories and prints the current configutation

Specified by:
initialize in interface org.globus.wsrf.jndi.Initializable
Throws:
java.lang.Exception