com.ibm.streams.operator.control.variable
Class DoubleControlVariable
- java.lang.Object
-
- javax.management.NotificationBroadcasterSupport
-
- com.ibm.streams.operator.control.NotifierSupport<T>
-
- com.ibm.streams.operator.control.AbstractPersistentControlMBean<T>
-
- com.ibm.streams.operator.control.variable.AbstractControlVariable<java.lang.Object>
-
- com.ibm.streams.operator.control.variable.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 thedouble
control variable MBean.
Thename
of the control variable is taken from thename
property of this MBean's.It is recommended operators use
createDoubleControlVariable
instead of manually creating and registeringDoubleControlVariable
MBeans.ControlVariableAccessor
provides simple support of adouble
control variable, hiding all the JMX interactions with the Job Control Plane.- Since:
- InfoSphere® Streams Version 4.0
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
IBM_COPYRIGHT
-
Fields inherited from class com.ibm.streams.operator.control.NotifierSupport
ATTRIBUTE_CHANGE_INFO
-
-
Constructor Summary
Constructors Constructor and Description DoubleControlVariable()
Create aDoubleControlVariableMXBean
with no initial value.DoubleControlVariable(double initialValue)
Create aDoubleControlVariableMXBean
with an initial value.
-
Method Summary
Methods Modifier and Type Method and Description double
getValue()
Get the value of this control variable.void
setValue(double value)
Set the value of this control variable.void
updateControlState(byte[] controlState)
Update this variable's value from its persisted state.-
Methods inherited from class com.ibm.streams.operator.control.variable.AbstractControlVariable
getName, preRegister
-
Methods inherited from class com.ibm.streams.operator.control.AbstractPersistentControlMBean
persistControlState, setupComplete
-
Methods inherited from class com.ibm.streams.operator.control.NotifierSupport
getObjectName, getServer, nextSequence, postDeregister, postRegister, preDeregister, sendAttributeChangeNotification, sendBooleanAttributeChangeNotification, sendNotification, sendNotification
-
Methods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ibm.streams.operator.control.variable.DoubleControlVariableMXBean
getName
-
Methods inherited from interface com.ibm.streams.operator.control.PersistentControlMBean
setupComplete
-
-
-
-
Field Detail
-
IBM_COPYRIGHT
public static final java.lang.String IBM_COPYRIGHT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DoubleControlVariable
public DoubleControlVariable()
Create aDoubleControlVariableMXBean
with no initial value. The value will be set to0.0
.
-
DoubleControlVariable
public DoubleControlVariable(double initialValue)
Create aDoubleControlVariableMXBean
with an initial value.
-
-
Method Detail
-
getValue
public double getValue()
Get the value of this control variable.- Specified by:
getValue
in interfaceDoubleControlVariableMXBean
- 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 anAttributeChangeNotification
is sent using attribute nameValue
.When the value changes it will be persisted in the Job Control Plane.
- Specified by:
setValue
in interfaceDoubleControlVariableMXBean
- 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 interfacePersistentControlMBean
- Parameters:
controlState
- Control state previous persisted for this MBean.
-
-