com.ibm.streams.operator.control

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 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.
        If Controllable.isApplicable(OperatorContext) returns false then 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 Controllable instance passed in will have its Controllable.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 operator String control variable that is maintained as a StringControlVariable in 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 the StringControlVariable results in an update to the value returned by ControlVariableAccessor.getValue().
        The value may be updated by: An operator simply gets the value of the variable by calling ControlVariableAccessor.getValue().

        The control variable may be:

        • Specific to an operator.
        • Shared across multiple operators in a job.
        The value is persisted by the Job Control Plane to ensure the value is maintained across any failures of the the Job Control Plane or its host.

        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
      • createLongControlVariable

        ControlVariableAccessor<java.lang.Long> createLongControlVariable(java.lang.String name,
                                                                          boolean shared,
                                                                          long initialValue)
        An operator long control variable that is maintained as a LongControlVariable in 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 the LongControlVariable results in an update to the value returned by ControlVariableAccessor.getValue().
        The value may be updated by: An operator simply gets the value of the variable by calling ControlVariableAccessor.getValue().

        The control variable may be:

        • Specific to an operator.
        • Shared across multiple operators in a job.
        The value is persisted by the Job Control Plane to ensure the value is maintained across any failures of the the Job Control Plane or its host.

        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
      • createBooleanControlVariable

        ControlVariableAccessor<java.lang.Boolean> createBooleanControlVariable(java.lang.String name,
                                                                                boolean shared,
                                                                                boolean initialValue)
        An operator boolean control variable that is maintained as a BooleanControlVariable in 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 the BooleanControlVariable results in an update to the value returned by ControlVariableAccessor.getValue().
        The value may be updated by: An operator simply gets the value of the variable by calling ControlVariableAccessor.getValue().

        The control variable may be:

        • Specific to an operator.
        • Shared across multiple operators in a job.
        The value is persisted by the Job Control Plane to ensure the value is maintained across any failures of the the Job Control Plane or its host.

        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
      • createDoubleControlVariable

        ControlVariableAccessor<java.lang.Double> createDoubleControlVariable(java.lang.String name,
                                                                              boolean shared,
                                                                              double initialValue)
        An operator double control variable that is maintained as a DoubleControlVariable in 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 the DoubleControlVariable results in an update to the value returned by ControlVariableAccessor.getValue().
        The value may be updated by: An operator simply gets the value of the variable by calling ControlVariableAccessor.getValue().

        The control variable may be:

        • Specific to an operator.
        • Shared across multiple operators in a job.
        The value is persisted by the Job Control Plane to ensure the value is maintained across any failures of the the Job Control Plane or its host.

        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