Package com.tangosol.util.filter
Class ScriptFilter<V>
- java.lang.Object
-
- com.tangosol.util.AbstractScript
-
- com.tangosol.util.filter.ScriptFilter<V>
-
- Type Parameters:
V
- the type of the value this Filter receives
- All Implemented Interfaces:
ExternalizableLite
,PortableObject
,Filter<V>
,Serializable
public class ScriptFilter<V> extends AbstractScript implements Filter<V>
ScriptFilter is aFilter
that wraps a script written in one of the languages supported by Graal VM.- Since:
- 14.1.1.0
- Author:
- mk 2019.07.26
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.tangosol.util.AbstractScript
m_aoArgs, m_sLanguage, m_sName
-
-
Constructor Summary
Constructors Constructor Description ScriptFilter()
Default constructor for deserialization.ScriptFilter(String language, String name, Object... args)
Create aFilter
that wraps the specified script.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
evaluate(V entry)
Apply the test to the input argument.-
Methods inherited from class com.tangosol.util.AbstractScript
getArgs, getLanguage, getName, readExternal, readExternal, writeExternal, writeExternal
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.tangosol.util.Filter
and, asLimitFilter, associatedWith, forKeys, forPartitions, or, toExpression, xor
-
-
-
-
Constructor Detail
-
ScriptFilter
public ScriptFilter()
Default constructor for deserialization.
-
ScriptFilter
public ScriptFilter(String language, String name, Object... args)
Create aFilter
that wraps the specified script.- Parameters:
language
- the language the script is written. Currently, only"js"
(for JavaScript) is supportedname
- the name of theFilter
that needs to be evaluatedargs
- the arguments to be passed to the script during evaluation
-
-