com.ibm.streams.operator.control.variable
Class LongControlVariable
- 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.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.
Thename
of the control variable is taken from thename
property of this MBean's.It is recommended operators use
createLongControlVariable
instead of manually creating and registeringLongControlVariable
MBeans.ControlVariableAccessor
provides simple support of along
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 LongControlVariable()
Create aLongControlVariableMXBean
with no initial value.LongControlVariable(long initialValue)
Create aLongControlVariableMXBean
with an initial value.
-
Method Summary
Methods Modifier and Type Method and Description long
getValue()
Get the value of this control variable.void
setValue(long 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.LongControlVariableMXBean
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
-
LongControlVariable
public LongControlVariable()
Create aLongControlVariableMXBean
with no initial value. The value will be set to0L
.
-
LongControlVariable
public LongControlVariable(long initialValue)
Create aLongControlVariableMXBean
with an initial value.
-
-
Method Detail
-
getValue
public long getValue()
Get the value of this control variable.- Specified by:
getValue
in interfaceLongControlVariableMXBean
- 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 anAttributeChangeNotification
is sent using attribute nameValue
.When the value changes it will be persisted in the Job Control Plane.
- Specified by:
setValue
in interfaceLongControlVariableMXBean
- 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.
-
-