Modifier and Type | Class and Description |
---|---|
static class |
ExpressionLanguage.Filter<T>
Filters a data stream, removing updates that match the given function.
|
static interface |
ExpressionLanguage.OneArgFunction<R,A>
A user provided single argument function.
|
static interface |
ExpressionLanguage.TwoArgFunction<R,A1,A2>
A user provided double argument function.
|
Modifier and Type | Method and Description |
---|---|
static <R> Cache<R> |
cacheOf(Class<R> clazz)
A cache of objects of the given class.
|
static ChannelExpression<Object,Object> |
channel(String name)
A channel with the given name of any type.
|
static <R,W> ChannelExpression<R,W> |
channel(String name,
Class<R> readType,
Class<W> writeType)
A channel with the given name and type.
|
static ChannelExpressionList<Object,Object> |
channels(Collection<String> names)
A list of channels with the given names of any type.
|
static <R,W> ChannelExpressionList<R,W> |
channels(Collection<String> names,
Class<R> readType,
Class<W> writeType)
A list of channels with the given names and type.
|
static ChannelExpressionList<Object,Object> |
channels(String... names)
A list of channels with the given names of any type.
|
static <T> DesiredRateExpression<T> |
constant(T value)
Creates a constant expression that always return that object.
|
static <T> DesiredRateExpression<T> |
constant(T value,
String name)
Creates a constant expression that always return that object, with the
given name for the expression.
|
static <T> DesiredRateExpression<List<T>> |
filterBy(ExpressionLanguage.Filter<?> filter,
DesiredRateExpression<List<T>> expression)
Filters a stream of updates with the given filter.
|
static <T> DesiredRateExpression<T> |
latestValueOf(SourceRateExpression<T> expression)
Expression that returns (only) the latest value computed
from a
SourceRateExpression . |
static <T> DesiredRateExpressionList<T> |
latestValueOf(SourceRateExpressionList<T> expressions)
Expression that returns (only) the latest value computed
from a
SourceRateExpression . |
static <R,W> DesiredRateReadWriteExpression<R,W> |
latestValueOf(SourceRateReadWriteExpression<R,W> expression)
For reads, returns (only) the latest value computed
from a
SourceRateReadWriteExpression ; for writes, same
as the given expression. |
static <R,W> DesiredRateReadWriteExpressionList<R,W> |
latestValueOf(SourceRateReadWriteExpressionList<R,W> expressions)
For reads, returns (only) the latest value computed
from a
SourceRateReadWriteExpression ; for writes, same
as the given expression. |
static <T> DesiredRateExpression<List<T>> |
listOf(DesiredRateExpressionList<T> expressions)
Converts a list of expressions to an expression that returns the list of results.
|
static <R,W> ReadWriteMap<R,W> |
mapOf(Class<R> readClass,
Class<W> writeClass)
An empty map that can read/write expressions of the given type.
|
static <R> ReadMap<R> |
mapOf(DesiredRateExpressionList<R> expressions)
An expression that returns a key/value map where the key is the
expression name and the value is the expression value.
|
static <R,W> ReadWriteMap<R,W> |
mapOf(DesiredRateReadWriteExpressionList<R,W> expressions)
An expression that works on a key/value map where the key is the
expression name and the value is the expression value.
|
static <W> WriteMap<W> |
mapOf(WriteExpressionList<W> expressions)
An expression that expects a key/value map where the key is the
expression name and the value is the expression value.
|
static <T> DesiredRateExpression<List<T>> |
newValuesOf(SourceRateExpression<T> expression)
Returns up to 1,000 new values generated by the expression source rate.
|
static <T> DesiredRateExpression<List<T>> |
newValuesOf(SourceRateExpression<T> expression,
int maxValues)
Returns up to maxValues new values generated by the expression source rate.
|
static <T> DesiredRateExpressionList<List<T>> |
newValuesOf(SourceRateExpressionList<T> expressions)
Returns all the new values generated by the expression source rate.
|
static <R> Queue<R> |
queueOf(Class<R> clazz)
A queue of objects of the given class.
|
static <R> ReadMap<R> |
readMapOf(Class<R> clazz)
An empty map that can manage expressions of the given type.
|
static <R,A> DesiredRateExpression<R> |
resultOf(ExpressionLanguage.OneArgFunction<R,A> function,
DesiredRateExpression<? extends A> argExpression)
An expression that represents the result of a user provided function.
|
static <R,A> DesiredRateExpression<R> |
resultOf(ExpressionLanguage.OneArgFunction<R,A> function,
DesiredRateExpression<? extends A> argExpression,
String name)
An expression that represents the result of a user provided function.
|
static <R,A1,A2> DesiredRateExpression<R> |
resultOf(ExpressionLanguage.TwoArgFunction<R,A1,A2> function,
DesiredRateExpression<? extends A1> arg1Expression,
DesiredRateExpression<? extends A2> arg2Expression)
An expression that represents the result of a user provided function.
|
static <R,A1,A2> DesiredRateExpression<R> |
resultOf(ExpressionLanguage.TwoArgFunction<R,A1,A2> function,
DesiredRateExpression<? extends A1> arg1Expression,
DesiredRateExpression<? extends A2> arg2Expression,
String name)
An expression that represents the result of a user provided function.
|
static <W> WriteMap<W> |
writeMapOf(Class<W> clazz)
An empty map that can write expressions of the given type.
|
public static <T> DesiredRateExpression<T> constant(T value)
T
- type of the valuevalue
- the actual valuepublic static <T> DesiredRateExpression<T> constant(T value, String name)
T
- type of the valuevalue
- the actual valuename
- the name of the expressionpublic static ChannelExpression<Object,Object> channel(String name)
name
- the channel namepublic static <R,W> ChannelExpression<R,W> channel(String name, Class<R> readType, Class<W> writeType)
R
- read payloadW
- write payloadname
- the channel namereadType
- type being readwriteType
- type being writtenpublic static ChannelExpressionList<Object,Object> channels(String... names)
names
- the channel names; can't be nullpublic static <R,W> ChannelExpressionList<R,W> channels(Collection<String> names, Class<R> readType, Class<W> writeType)
R
- read payloadW
- write payloadreadType
- type being readwriteType
- type being writtennames
- the channel names; can't be nullpublic static ChannelExpressionList<Object,Object> channels(Collection<String> names)
names
- the channel names; can't be nullpublic static <T> DesiredRateExpressionList<List<T>> newValuesOf(SourceRateExpressionList<T> expressions)
T
- type being readexpressions
- source rate expressionspublic static <T> DesiredRateExpression<List<T>> newValuesOf(SourceRateExpression<T> expression)
You are strongly encouraged to use newValuesOf(org.epics.pvmanager.expression.SourceRateExpression, int)
to set a limit that is appropriate for your application.
T
- type being readexpression
- source rate expressionpublic static <T> DesiredRateExpression<List<T>> newValuesOf(SourceRateExpression<T> expression, int maxValues)
T
- type being readexpression
- source rate expressionmaxValues
- maximum number of values to send with each notificationpublic static <T> DesiredRateExpression<T> latestValueOf(SourceRateExpression<T> expression)
SourceRateExpression
.T
- type being readexpression
- expression read at the source ratepublic static <T> DesiredRateExpressionList<T> latestValueOf(SourceRateExpressionList<T> expressions)
SourceRateExpression
.T
- type being readexpressions
- expressions read at the source ratepublic static <R,W> DesiredRateReadWriteExpression<R,W> latestValueOf(SourceRateReadWriteExpression<R,W> expression)
SourceRateReadWriteExpression
; for writes, same
as the given expression.R
- read payloadW
- write payloadexpression
- expression read at the source ratepublic static <R,W> DesiredRateReadWriteExpressionList<R,W> latestValueOf(SourceRateReadWriteExpressionList<R,W> expressions)
SourceRateReadWriteExpression
; for writes, same
as the given expression.R
- read payloadW
- write payloadexpressions
- expressions read at the source ratepublic static <R,A> DesiredRateExpression<R> resultOf(ExpressionLanguage.OneArgFunction<R,A> function, DesiredRateExpression<? extends A> argExpression)
R
- result typeA
- argument typefunction
- the user provided functionargExpression
- expression for the function argumentpublic static <R,A> DesiredRateExpression<R> resultOf(ExpressionLanguage.OneArgFunction<R,A> function, DesiredRateExpression<? extends A> argExpression, String name)
R
- result typeA
- argument typefunction
- the user provided functionargExpression
- expression for the function argumentname
- expression namepublic static <R,A1,A2> DesiredRateExpression<R> resultOf(ExpressionLanguage.TwoArgFunction<R,A1,A2> function, DesiredRateExpression<? extends A1> arg1Expression, DesiredRateExpression<? extends A2> arg2Expression)
R
- result typeA1
- first argument typeA2
- second argument typefunction
- the user provided functionarg1Expression
- expression for the first argumentarg2Expression
- expression for the second argumentpublic static <R,A1,A2> DesiredRateExpression<R> resultOf(ExpressionLanguage.TwoArgFunction<R,A1,A2> function, DesiredRateExpression<? extends A1> arg1Expression, DesiredRateExpression<? extends A2> arg2Expression, String name)
R
- result typeA1
- first argument typeA2
- second argument typefunction
- the user provided functionarg1Expression
- expression for the first argumentarg2Expression
- expression for the second argumentname
- expression namepublic static <T> DesiredRateExpression<List<T>> filterBy(ExpressionLanguage.Filter<?> filter, DesiredRateExpression<List<T>> expression)
T
- the type of data streaming in and outfilter
- the filtering functionexpression
- the argument expressionpublic static <T> DesiredRateExpression<List<T>> listOf(DesiredRateExpressionList<T> expressions)
T
- type being readexpressions
- a list of expressionspublic static <R> ReadMap<R> readMapOf(Class<R> clazz)
The returned expression is dynamic, which means child expressions can be added or removed from the map.
R
- the type of the valuesclazz
- the type of the valuespublic static <W> WriteMap<W> writeMapOf(Class<W> clazz)
The returned expression is dynamic, which means child expressions can be added or removed from the map.
W
- the type of the valuesclazz
- the type of the valuespublic static <R,W> ReadWriteMap<R,W> mapOf(Class<R> readClass, Class<W> writeClass)
The returned expression is dynamic, which means child expressions can be added or removed from the map.
R
- the type of the values to readW
- the type of the values to writereadClass
- the type of the values to readwriteClass
- the type of the values to writepublic static <R> ReadMap<R> mapOf(DesiredRateExpressionList<R> expressions)
The returned expression is dynamic, which means child expressions can be added or removed from the map.
R
- the type of the valuesexpressions
- a list of expressionspublic static <W> WriteMap<W> mapOf(WriteExpressionList<W> expressions)
The returned expression is dynamic, which means child expressions can be added or removed from the map.
W
- the type of the valuesexpressions
- a list of expressionspublic static <R,W> ReadWriteMap<R,W> mapOf(DesiredRateReadWriteExpressionList<R,W> expressions)
The returned expression is dynamic, which means child expressions can be added or removed from the map.
R
- the type for the read valuesW
- the type for the write valuesexpressions
- a list of expressionspublic static <R> Queue<R> queueOf(Class<R> clazz)
This can be used to create expressions where the source of the data is not just pvmanager data sources. One can add new values to a queue from any thread, and in response to any event, such as user input, updates from time consuming tasks or responses from services.
R
- the type to be kept in the queueclazz
- the type for the values to be kept in the queuepublic static <R> Cache<R> cacheOf(Class<R> clazz)
This can be used to create expressions where the source of the data is not just pvmanager data sources. One can add new values to the cache from any thread, and in response to any event, such as user input, updates from time consuming tasks or responses from services.
R
- the type to be kept in the queueclazz
- the type for the values to be kept in the queueCopyright © 2010–2015. All rights reserved.