public interface Invocable
MemberInvocable
interface where the application specifies which members should execute the interface.
Execution of the Invocable interface is triggered by an application which can be running on the same member or a different member of the space. In ActiveSpaces, this is referred to as remote invocation. The remote invocation code is colocated with the data which increases performance.
With the Invocable interface, the application indicates the key of an entry stored in the space. ActiveSpaces determines which space member stores the element associated with the key or which space member would be used to store the element, if the element does not exist in the space. Execution of the Invocable interface will then occur on that space member.
The code implementing the Invocable interface needs to be included in the CLASSPATH for each member of the space.
Modifier and Type | Method and Description |
---|---|
Tuple |
invoke(Space space,
Tuple tuple,
Tuple context)
The
invoke method is executed on the space member where the entry associated with the key specified
in the tuple parameter is stored. |
Tuple invoke(Space space, Tuple tuple, Tuple context)
invoke
method is executed on the space member where the entry associated with the key specified
in the tuple
parameter is stored.
Execution of the invoke
method is initiated by the client application calling the following
method:
Space.invoke(com.tibco.as.space.Tuple, java.lang.String, com.tibco.as.space.InvokeOptions)
The invoke
method is executed regardless of whether or not an entry exists for the specified
key.
The invoke
method is guaranteed to be called at least once, but may be called multiple times.
Therefore, the invoke
method should be idempotent.
space
- Space object that the invocation request is coming fromtuple
- Contains a field named "key" whose integer value is used to direct invocation to a
specific space membercontext
- Tuple used to pass in user defined context informationCopyright (c) 2014 Cloud Software Group, Inc. All rights reserved.