public class ScriptService extends AbstractComponent implements java.io.Closeable, ClusterStateListener
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ALLOW_NONE |
static Setting<java.util.List<java.lang.String>> |
CONTEXTS_ALLOWED_SETTING |
static Setting<TimeValue> |
SCRIPT_CACHE_EXPIRE_SETTING |
static Setting<java.lang.Integer> |
SCRIPT_CACHE_SIZE_SETTING |
static Setting<Tuple<java.lang.Integer,TimeValue>> |
SCRIPT_MAX_COMPILATIONS_RATE |
static Setting<java.lang.Integer> |
SCRIPT_MAX_SIZE_IN_BYTES |
static Setting<java.util.List<java.lang.String>> |
TYPES_ALLOWED_SETTING |
deprecationLogger, logger, settings
Constructor and Description |
---|
ScriptService(Settings settings,
java.util.Map<java.lang.String,ScriptEngine> engines,
java.util.Map<java.lang.String,ScriptContext<?>> contexts) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
clusterChanged(ClusterChangedEvent event)
Called when cluster state changes.
|
<FactoryType> |
compile(Script script,
ScriptContext<FactoryType> context)
Compiles a script using the given context.
|
void |
deleteStoredScript(ClusterService clusterService,
DeleteStoredScriptRequest request,
ActionListener<DeleteStoredScriptResponse> listener) |
StoredScriptSource |
getStoredScript(ClusterState state,
GetStoredScriptRequest request) |
boolean |
isAnyContextEnabled() |
boolean |
isContextEnabled(ScriptContext scriptContext) |
boolean |
isLangSupported(java.lang.String lang) |
boolean |
isTypeEnabled(ScriptType scriptType) |
void |
putStoredScript(ClusterService clusterService,
PutStoredScriptRequest request,
ActionListener<PutStoredScriptResponse> listener) |
ScriptStats |
stats() |
logDeprecatedSetting, logRemovedSetting, nodeName
public static final Setting<java.lang.Integer> SCRIPT_CACHE_SIZE_SETTING
public static final Setting<java.lang.Integer> SCRIPT_MAX_SIZE_IN_BYTES
public static final Setting<Tuple<java.lang.Integer,TimeValue>> SCRIPT_MAX_COMPILATIONS_RATE
public static final java.lang.String ALLOW_NONE
public static final Setting<java.util.List<java.lang.String>> TYPES_ALLOWED_SETTING
public static final Setting<java.util.List<java.lang.String>> CONTEXTS_ALLOWED_SETTING
public ScriptService(Settings settings, java.util.Map<java.lang.String,ScriptEngine> engines, java.util.Map<java.lang.String,ScriptContext<?>> contexts)
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException
public <FactoryType> FactoryType compile(Script script, ScriptContext<FactoryType> context)
public boolean isLangSupported(java.lang.String lang)
public boolean isTypeEnabled(ScriptType scriptType)
public boolean isContextEnabled(ScriptContext scriptContext)
public boolean isAnyContextEnabled()
public void putStoredScript(ClusterService clusterService, PutStoredScriptRequest request, ActionListener<PutStoredScriptResponse> listener)
public void deleteStoredScript(ClusterService clusterService, DeleteStoredScriptRequest request, ActionListener<DeleteStoredScriptResponse> listener)
public StoredScriptSource getStoredScript(ClusterState state, GetStoredScriptRequest request)
public ScriptStats stats()
public void clusterChanged(ClusterChangedEvent event)
ClusterStateListener
clusterChanged
in interface ClusterStateListener