com.ibm.streams.operator.control.variable

Class DoubleControlVariable

  • All Implemented Interfaces:
    PersistentControlMBean, DoubleControlVariableMXBean, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter


    public class DoubleControlVariable
    extends AbstractControlVariable<java.lang.Object>
    implements DoubleControlVariableMXBean
    Provides the implementation of the double control variable MBean.
    The name of the control variable is taken from the name property of this MBean's.

    It is recommended operators use createDoubleControlVariable instead of manually creating and registering DoubleControlVariable MBeans. ControlVariableAccessor provides simple support of a double control variable, hiding all the JMX interactions with the Job Control Plane.

    Since:
    InfoSphere® Streams Version 4.0
    • Constructor Detail

      • DoubleControlVariable

        public DoubleControlVariable()
        Create a DoubleControlVariableMXBean with no initial value. The value will be set to 0.0.
      • DoubleControlVariable

        public DoubleControlVariable(double initialValue)
        Create a DoubleControlVariableMXBean with an initial value.
    • Method Detail

      • getValue

        public double getValue()
        Get the value of this control variable.
        Specified by:
        getValue in interface DoubleControlVariableMXBean
        Returns:
        the value of this control variable.
      • setValue

        public void setValue(double value)
                      throws java.io.IOException
        Set the value of this control variable. If the value changes an AttributeChangeNotification is sent using attribute name Value.

        When the value changes it will be persisted in the Job Control Plane.

        Specified by:
        setValue in interface DoubleControlVariableMXBean
        Parameters:
        value - New value for this control variable.
        Throws:
        java.io.IOException - Exception persisting the control variable in the Job Control Plane.
      • updateControlState

        public void updateControlState(byte[] controlState)
        Update this variable's value from its persisted state.
        Specified by:
        updateControlState in interface PersistentControlMBean
        Parameters:
        controlState - Control state previous persisted for this MBean.