Package org.apache.solr.ltr.store.rest
Class ManagedFeatureStore
- java.lang.Object
-
- org.apache.solr.rest.ManagedResource
-
- org.apache.solr.ltr.store.rest.ManagedFeatureStore
-
- All Implemented Interfaces:
ManagedResource.ChildResourceSupport
public class ManagedFeatureStore extends ManagedResource implements ManagedResource.ChildResourceSupport
Managed resource for a storing a feature.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.solr.rest.ManagedResource
ManagedResource.ChildResourceSupport
-
-
Field Summary
Fields Modifier and Type Field Description static String
REST_END_POINT
the feature store rest endpoint-
Fields inherited from class org.apache.solr.rest.ManagedResource
INIT_ARGS_JSON_FIELD, INITIALIZED_ON_JSON_FIELD, initializedOn, lastUpdateSinceInitialization, MANAGED_JSON_LIST_FIELD, MANAGED_JSON_MAP_FIELD, managedInitArgs, solrResourceLoader, storage, UPDATED_SINCE_INIT_JSON_FIELD
-
-
Constructor Summary
Constructors Constructor Description ManagedFeatureStore(String resourceId, SolrResourceLoader loader, ManagedResourceStorage.StorageIO storageIO)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFeature(Map<String,Object> map, String featureStore)
Object
applyUpdatesToManagedData(Object updates)
void
doDeleteChild(BaseSolrResource endpoint, String childId)
void
doGet(BaseSolrResource endpoint, String childId)
Called to retrieve a named part (the given childId) of the resource at the given endpoint.FeatureStore
getFeatureStore(String name)
static ManagedFeatureStore
getManagedFeatureStore(SolrCore core)
Map<String,FeatureStore>
getStores()
protected void
onManagedDataLoadedFromStorage(org.apache.solr.common.util.NamedList<?> managedInitArgs, Object managedData)
static void
registerManagedFeatureStore(SolrResourceLoader solrResourceLoader, ManagedResourceObserver managedResourceObserver)
-
Methods inherited from class org.apache.solr.rest.ManagedResource
buildMapToStore, convertNamedListToMap, createStorage, doPost, doPut, getInitializedOn, getResourceId, getResourceLoader, getServerResourceClass, getUpdatedSinceInitialization, hasChangesSinceInitialization, loadManagedDataAndNotify, notifyObserversDuringInit, onResourceDeleted, processStoredData, reloadFromStorage, storeManagedData, updateInitArgs
-
-
-
-
Field Detail
-
REST_END_POINT
public static final String REST_END_POINT
the feature store rest endpoint- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ManagedFeatureStore
public ManagedFeatureStore(String resourceId, SolrResourceLoader loader, ManagedResourceStorage.StorageIO storageIO) throws org.apache.solr.common.SolrException
- Throws:
org.apache.solr.common.SolrException
-
-
Method Detail
-
registerManagedFeatureStore
public static void registerManagedFeatureStore(SolrResourceLoader solrResourceLoader, ManagedResourceObserver managedResourceObserver)
-
getManagedFeatureStore
public static ManagedFeatureStore getManagedFeatureStore(SolrCore core)
-
getStores
public Map<String,FeatureStore> getStores()
-
getFeatureStore
public FeatureStore getFeatureStore(String name)
-
onManagedDataLoadedFromStorage
protected void onManagedDataLoadedFromStorage(org.apache.solr.common.util.NamedList<?> managedInitArgs, Object managedData) throws org.apache.solr.common.SolrException
- Specified by:
onManagedDataLoadedFromStorage
in classManagedResource
- Throws:
org.apache.solr.common.SolrException
-
applyUpdatesToManagedData
public Object applyUpdatesToManagedData(Object updates)
- Specified by:
applyUpdatesToManagedData
in classManagedResource
-
doDeleteChild
public void doDeleteChild(BaseSolrResource endpoint, String childId)
- Specified by:
doDeleteChild
in classManagedResource
-
doGet
public void doGet(BaseSolrResource endpoint, String childId)
Called to retrieve a named part (the given childId) of the resource at the given endpoint. Note: since we have a unique child feature store we ignore the childId.- Specified by:
doGet
in classManagedResource
-
-