Package org.elasticsearch.script
Class MockScriptService
java.lang.Object
org.elasticsearch.script.ScriptService
org.elasticsearch.script.MockScriptService
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,org.elasticsearch.cluster.ClusterStateApplier
public class MockScriptService
extends org.elasticsearch.script.ScriptService
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MockScriptService.TestPlugin
Marker plugin used byMockNode
to enableMockScriptService
. -
Field Summary
Fields inherited from class org.elasticsearch.script.ScriptService
ALLOW_NONE, CONTEXTS_ALLOWED_SETTING, SCRIPT_CACHE_EXPIRE_SETTING, SCRIPT_CACHE_SIZE_SETTING, SCRIPT_DISABLE_MAX_COMPILATIONS_RATE_SETTING, SCRIPT_GENERAL_CACHE_EXPIRE_SETTING, SCRIPT_GENERAL_CACHE_SIZE_SETTING, SCRIPT_GENERAL_MAX_COMPILATIONS_RATE_SETTING, SCRIPT_MAX_COMPILATIONS_RATE_SETTING, SCRIPT_MAX_SIZE_IN_BYTES, TYPES_ALLOWED_SETTING
-
Constructor Summary
Constructors Constructor Description MockScriptService(org.elasticsearch.common.settings.Settings settings, java.util.Map<java.lang.String,org.elasticsearch.script.ScriptEngine> engines, java.util.Map<java.lang.String,org.elasticsearch.script.ScriptContext<?>> contexts)
-
Method Summary
Modifier and Type Method Description static <T> MockScriptService
singleContext(org.elasticsearch.script.ScriptContext<T> context, java.util.function.Function<java.lang.String,T> compile, java.util.Map<java.lang.String,org.elasticsearch.script.StoredScriptSource> storedLookup)
Methods inherited from class org.elasticsearch.script.ScriptService
applyClusterState, cacheStats, close, compile, deleteStoredScript, getContextInfos, getScriptFromClusterState, getScriptLanguages, getStoredScript, isAnyContextEnabled, isContextEnabled, isLangSupported, isTypeEnabled, putStoredScript, stats
-
Constructor Details
-
MockScriptService
public MockScriptService(org.elasticsearch.common.settings.Settings settings, java.util.Map<java.lang.String,org.elasticsearch.script.ScriptEngine> engines, java.util.Map<java.lang.String,org.elasticsearch.script.ScriptContext<?>> contexts)
-
-
Method Details
-
singleContext
public static <T> MockScriptService singleContext(org.elasticsearch.script.ScriptContext<T> context, java.util.function.Function<java.lang.String,T> compile, java.util.Map<java.lang.String,org.elasticsearch.script.StoredScriptSource> storedLookup)
-