public class OpenSearchDataSource extends Object
OpenSearchOp OpenSearch operator
Each OpenSearchDataSourceResource of this stateful service handles a number of OpenSearch providers. Each provider is associated with
a collection and an OpenSearchResource generic resource containing information for the provider.
A OpenSearchDataSourceResource published a set field information, which specifies which search fields are searchable and presentable on a collection.
While querying, all generic resources and description documents retrieved are stored in a cache contained in each OpenSearchDataSourceResource
The cache can be refreshed either on demand or periodically, or through both ways to allow the service to update its state in the event of generic resource update
or modifications in the description documents of providers.
The cache purging time interval as well as whether the service should clear the cache on startup are configurable parameters| Modifier and Type | Class and Description |
|---|---|
static class |
OpenSearchDataSource.SupportedRelations |
| Modifier and Type | Field and Description |
|---|---|
String[] |
supportedRelations |
| Constructor and Description |
|---|
OpenSearchDataSource()
Constructor - sets up some variables and creates a logging instance
|
| Modifier and Type | Method and Description |
|---|---|
org.gcube.opensearch.opensearchdatasource.stubs.AddProvidersResponse |
addProviders(org.gcube.opensearch.opensearchdatasource.stubs.AddProvidersParams req) |
String |
query(String cqlQuery)
Performs a query on the OpenSearch provider associated with the WS resource used and described by the corresponding generic resource
|
static void |
ready() |
org.gcube.opensearch.opensearchdatasource.stubs.RefreshCacheResponse |
refreshCache(org.gcube.opensearch.opensearchdatasource.stubs.RefreshCache req)
Forced cache refresh operation
|
public String[] supportedRelations
public OpenSearchDataSource()
throws RemoteException
RemoteExceptionpublic String query(String cqlQuery) throws RemoteException
cqlQuery - String - the gCQL query to be translated a set of queries with the syntax of the OpenSearch operator -
space separated <(URLEncodedParameterNamespace|config):parameterName> strings)String - a gRS2 locator which holds the results of the query.RemoteException - In case of errorpublic org.gcube.opensearch.opensearchdatasource.stubs.RefreshCacheResponse refreshCache(org.gcube.opensearch.opensearchdatasource.stubs.RefreshCache req)
throws RemoteException
req - An empty RefreshCache requestRefreshCacheResponseRemoteException - In case of errorCacheRefresher#forceRefresh()}public org.gcube.opensearch.opensearchdatasource.stubs.AddProvidersResponse addProviders(org.gcube.opensearch.opensearchdatasource.stubs.AddProvidersParams req)
throws RemoteException
RemoteExceptionpublic static void ready()
Copyright © 2014. All Rights Reserved.