Package io.higson.runtime.provider
Class MpParameterProvider
java.lang.Object
io.higson.runtime.provider.MpParameterProvider
- All Implemented Interfaces:
ParamRepository
- Author:
- przemek hertel
-
Constructor Summary
ConstructorsConstructorDescriptionMpParameterProvider(ParameterDao dao, ExternalStorageDao externalDao) MpParameterProvider(ParameterDao dao, ExternalStorageDao externalDao, int maxConcurrentLoads) MpParameterProvider(ParameterDao dao, ExternalStorageDao externalDao, int maxConcurrentLoads, ExternalDataSourceProvider externalDataSourceProvider, ConnectionInterceptor connectionInterceptor, ParameterAiModelService parameterAiModelService) -
Method Summary
Modifier and TypeMethodDescriptionSupport for batch loading of parameter, when there are too many entries to read them all at once.findEntries(int pid, String[][] inputLevels) Return set of entries from parameter that match provided query values.getAllLastUpdates(boolean developerMode) getLastUpdate(boolean developerMode) intReturns set of all parameter names kept in this repository.Load parameter.
-
Constructor Details
-
MpParameterProvider
public MpParameterProvider(ParameterDao dao, ExternalStorageDao externalDao, int maxConcurrentLoads, ExternalDataSourceProvider externalDataSourceProvider, ConnectionInterceptor connectionInterceptor, ParameterAiModelService parameterAiModelService) -
MpParameterProvider
public MpParameterProvider(ParameterDao dao, ExternalStorageDao externalDao, int maxConcurrentLoads) -
MpParameterProvider
-
-
Method Details
-
load
Description copied from interface:ParamRepositoryLoad parameter. If parameter is not cacheable, this method should return only metadata (parameter object with empty entry set). Parameter query evaluation should be done usingParamRepository.findEntries(int, String[][])method.- Specified by:
loadin interfaceParamRepository- Parameters:
uid- unique name- Returns:
- parameter
-
getLastUpdate
-
getLastUpdate
-
getAllLastUpdates
-
findEntries
Description copied from interface:ParamRepositoryReturn set of entries from parameter that match provided query values. Repository has to do the matching by its own means. Implementation of this method is optional, should return null if not supported.- Specified by:
findEntriesin interfaceParamRepository- Parameters:
pid- parameter identifierinputLevels- query (level) values- Returns:
- set of entries or null if either not found or not supported
-
batchLoad
Description copied from interface:ParamRepositorySupport for batch loading of parameter, when there are too many entries to read them all at once.- Specified by:
batchLoadin interfaceParamRepository- Parameters:
parameterName- name of parameter- Returns:
- metadata + batch loader of entries
-
listParameters
Description copied from interface:ParamRepositoryReturns set of all parameter names kept in this repository.- Specified by:
listParametersin interfaceParamRepository- Returns:
- parameter names
-
getNumberOfLoadsInProgress
public int getNumberOfLoadsInProgress()
-