com.ibm.streams.operator.control.variable

Class StringControlVariable

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


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

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

    Since:
    InfoSphere® Streams Version 4.0
    • Constructor Detail

      • StringControlVariable

        public StringControlVariable()
        Create a StringControlVariableMXBean with no initial value. The value will be set to null.
      • StringControlVariable

        public StringControlVariable(java.lang.String initialValue)
        Create a StringControlVariableMXBean with an initial value.
    • Method Detail

      • getValue

        public java.lang.String getValue()
        Get the value of this control variable.
        Specified by:
        getValue in interface StringControlVariableMXBean
        Returns:
        the value of this control variable.
      • setValue

        public void setValue(java.lang.String 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 StringControlVariableMXBean
        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.