java.io.Closeable, java.lang.AutoCloseable, ClusterStateApplierpublic class ScriptService extends AbstractComponent implements java.io.Closeable, ClusterStateApplier
| Modifier and Type | Field | 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 | Description |
|---|---|
ScriptService(Settings settings,
java.util.Map<java.lang.String,ScriptEngine> engines,
java.util.Map<java.lang.String,ScriptContext<?>> contexts) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
applyClusterState(ClusterChangedEvent event) |
Called when a new cluster state (
ClusterChangedEvent.state() needs to be applied |
void |
close() |
|
<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, nodeNamepublic 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.lang.AutoCloseableclose in interface java.io.Closeablejava.io.IOExceptionpublic <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 applyClusterState(ClusterChangedEvent event)
ClusterStateApplierClusterChangedEvent.state() needs to be appliedapplyClusterState in interface ClusterStateApplier