com.ibm.streams.operator.control.variable

Class LongControlVariable

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


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

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

    Since:
    InfoSphere® Streams Version 4.0
    • Constructor Detail

      • LongControlVariable

        public LongControlVariable()
        Create a LongControlVariableMXBean with no initial value. The value will be set to 0L.
      • LongControlVariable

        public LongControlVariable(long initialValue)
        Create a LongControlVariableMXBean with an initial value.
    • Method Detail

      • getValue

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

        public void setValue(long 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 LongControlVariableMXBean
        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.