Interface ControlPlaneContext
-
- All Superinterfaces:
- OptionalContext
public interface ControlPlaneContext extends OptionalContext
Interface to provide access to Job Control Plane for Java Operators and functions.
The Job Control Plane supports the exchange of control or management information between operators in an SPL application. The Job Control Plane is a job scoped JMX (Java Management Extensions) MBean server. Java primitive operators can create management beans, known as MBeans, in this server to exchange control information. Once an operator creates an MBean, other operators and external JMX clients, can interact with it through its attributes, operations and notifications.- Since:
- InfoSphere® Streams Version 4.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidconnect()Connect the PE for this operator to the Job Control Plane.voidconnect(Controllable controllable)Connect the PE for this operator to the Job Control Plane.ControlVariableAccessor<java.lang.Boolean>createBooleanControlVariable(java.lang.String name, boolean shared, boolean initialValue)An operatorbooleancontrol variable that is maintained as aBooleanControlVariablein the Job Control Plane.ControlVariableAccessor<java.lang.Double>createDoubleControlVariable(java.lang.String name, boolean shared, double initialValue)An operatordoublecontrol variable that is maintained as aDoubleControlVariablein the Job Control Plane.ControlVariableAccessor<java.lang.Long>createLongControlVariable(java.lang.String name, boolean shared, long initialValue)An operatorlongcontrol variable that is maintained as aLongControlVariablein the Job Control Plane.ControlVariableAccessor<java.lang.String>createStringControlVariable(java.lang.String name, boolean shared, java.lang.String initialValue)An operatorStringcontrol variable that is maintained as aStringControlVariablein the Job Control Plane.
-
-
-
Method Detail
-
connect
void connect()
Connect the PE for this operator to the Job Control Plane. A single connection for a PE is maintained to the Job Control Plane. Connection occurs asynchronously.
-
connect
void connect(Controllable controllable)
Connect the PE for this operator to the Job Control Plane. A single connection is maintained to the Job Control Plane. The connection occurs asynchronously.
IfControllable.isApplicable(OperatorContext)returnsfalsethen no action is taken, and no connection to the Job Control Plane is initiated by this call.
Once a connection is established, if the connection fails reconnect attempts are made automatically until a successful connection is made.The
Controllableinstance passed in will have itsControllable.setup(javax.management.MBeanServerConnection, OperatorContext)method called every time a connection is made to the Job Control Plane.- Parameters:
controllable-
-
createStringControlVariable
ControlVariableAccessor<java.lang.String> createStringControlVariable(java.lang.String name, boolean shared, java.lang.String initialValue)
An operatorStringcontrol variable that is maintained as aStringControlVariablein the Job Control Plane. This class maintains a local copy of the variable's value to reduce access cost, any change in the value in theStringControlVariableresults in an update to the value returned byControlVariableAccessor.getValue().
The value may be updated by:- Any JMX client invoking the
StringControlVariableMXBean.setValue(String)operation against the MXBean in the Job Control Plane. - An operator invoking
ControlVariableAccessor.setValue(Object)on their instance ofControlVariableAccessor.
ControlVariableAccessor.getValue().The control variable may be:
- Specific to an operator.
- Shared across multiple operators in a job.
This class handles all the JMX interactions with the Job Control Plane including registering the MXBean and handling notifications. If this is a shared control variable then all operators that want to access the control variable create an instance of this class with the same name.
- Since:
- InfoSphere® Streams Version 4.0
- Any JMX client invoking the
-
createLongControlVariable
ControlVariableAccessor<java.lang.Long> createLongControlVariable(java.lang.String name, boolean shared, long initialValue)
An operatorlongcontrol variable that is maintained as aLongControlVariablein the Job Control Plane. This class maintains a local copy of the variable's value to reduce access cost, any change in the value in theLongControlVariableresults in an update to the value returned byControlVariableAccessor.getValue().
The value may be updated by:- Any JMX client invoking the
LongControlVariableMXBean.setValue(long)operation against the MXBean in the Job Control Plane. - An operator invoking
ControlVariableAccessor.setValue(Object)on their instance ofControlVariableAccessor.
ControlVariableAccessor.getValue().The control variable may be:
- Specific to an operator.
- Shared across multiple operators in a job.
This class handles all the JMX interactions with the Job Control Plane including registering the MXBean and handling notifications. If this is a shared control variable then all operators that want to access the control variable create an instance of this class with the same name.
- Since:
- InfoSphere® Streams Version 4.0
- Any JMX client invoking the
-
createBooleanControlVariable
ControlVariableAccessor<java.lang.Boolean> createBooleanControlVariable(java.lang.String name, boolean shared, boolean initialValue)
An operatorbooleancontrol variable that is maintained as aBooleanControlVariablein the Job Control Plane. This class maintains a local copy of the variable's value to reduce access cost, any change in the value in theBooleanControlVariableresults in an update to the value returned byControlVariableAccessor.getValue().
The value may be updated by:- Any JMX client invoking the
BooleanControlVariableMXBean.setValue(boolean)operation against the MXBean in the Job Control Plane. - An operator invoking
ControlVariableAccessor.setValue(Object)on their instance ofControlVariableAccessor.
ControlVariableAccessor.getValue().The control variable may be:
- Specific to an operator.
- Shared across multiple operators in a job.
This class handles all the JMX interactions with the Job Control Plane including registering the MXBean and handling notifications. If this is a shared control variable then all operators that want to access the control variable create an instance of this class with the same name.
- Since:
- InfoSphere® Streams Version 4.0
- Any JMX client invoking the
-
createDoubleControlVariable
ControlVariableAccessor<java.lang.Double> createDoubleControlVariable(java.lang.String name, boolean shared, double initialValue)
An operatordoublecontrol variable that is maintained as aDoubleControlVariablein the Job Control Plane. This class maintains a local copy of the variable's value to reduce access cost, any change in the value in theDoubleControlVariableresults in an update to the value returned byControlVariableAccessor.getValue().
The value may be updated by:- Any JMX client invoking the
DoubleControlVariableMXBean.setValue(double)operation against the MXBean in the Job Control Plane. - An operator invoking
ControlVariableAccessor.setValue(Object)on their instance ofControlVariableAccessor.
ControlVariableAccessor.getValue().The control variable may be:
- Specific to an operator.
- Shared across multiple operators in a job.
This class handles all the JMX interactions with the Job Control Plane including registering the MXBean and handling notifications. If this is a shared control variable then all operators that want to access the control variable create an instance of this class with the same name.
- Since:
- InfoSphere® Streams Version 4.0
- Any JMX client invoking the
-
-