com.ibm.streams.operator.control
Interface ConsistentRegionMXBean
-
public interface ConsistentRegionMXBean
Management Bean (MBean) registered in the Job Control Plane for a consistent region within the job. The name of the MBean is obtained fromConsistentRegionContext.getConsistentRegionMXBeanName()
and will be equal to:
com.ibm.streams.control:type=consistent,index=N
whereN
is theindex
of this consistent region.- Since:
- InfoSphere® Streams Version 4.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface and Description static class
ConsistentRegionMXBean.State
States of a consistent region.static class
ConsistentRegionMXBean.Trigger
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
TYPE
Type of this MBean in its object name.
-
Method Summary
Methods Modifier and Type Method and Description double
getDrainTimeout()
Gets the drain timeout as configured via the @consistent SPL annotation.int
getIndex()
Returns the index of the consistent region.long
getLastCompletedSequenceID()
Gets the identifier of the last successfully completed drain.long
getMaxConsecutiveResetAttempts()
Gets the maximum number of consecutive reset attempts as configured via the @consistent SPL annotation.java.lang.String
getName()
Get the name of the consistent region.double
getPeriod()
Gets the period of the consistent region as configured via the @consistent SPL annotation.double
getResetTimeout()
Gets the reset timeout as configured via the @consistent SPL annotation.ConsistentRegionMXBean.State
getState()
Returns a string indicating the current state of the consistent region.ConsistentRegionMXBean.Trigger
getTrigger()
Gets the trigger of the consistent region as configured via the @consistent SPL annotation.void
reset(boolean force)
Requests a reset of the region to the last consistent state.
-
-
-
Field Detail
-
TYPE
static final java.lang.String TYPE
Type of this MBean in its object name.- See Also:
- Constant Field Values
-
-
Method Detail
-
getIndex
int getIndex()
Returns the index of the consistent region.- Returns:
- the index of the consistent region.
-
getName
java.lang.String getName()
Get the name of the consistent region.- Returns:
- Name of the consistent region.
-
getTrigger
ConsistentRegionMXBean.Trigger getTrigger()
Gets the trigger of the consistent region as configured via the @consistent SPL annotation.- Returns:
ConsistentRegionMXBean.Trigger.PERIODIC
, if the consistent region is periodic, orConsistentRegionMXBean.Trigger.OPERATOR_DRIVEN
, if the consistent region is operator driven.
-
getPeriod
double getPeriod()
Gets the period of the consistent region as configured via the @consistent SPL annotation.If the region is configured with trigger=operatorDriven, this method returns a value of 0.0.
- Returns:
- the period of the consistent region.
-
getDrainTimeout
double getDrainTimeout()
Gets the drain timeout as configured via the @consistent SPL annotation.- Returns:
- the timeout of a drain operation.
-
getResetTimeout
double getResetTimeout()
Gets the reset timeout as configured via the @consistent SPL annotation.- Returns:
- the timeout of a reset operation.
-
getMaxConsecutiveResetAttempts
long getMaxConsecutiveResetAttempts()
Gets the maximum number of consecutive reset attempts as configured via the @consistent SPL annotation.- Returns:
- the maximum number of consecutive reset attempts.
-
getLastCompletedSequenceID
long getLastCompletedSequenceID()
Gets the identifier of the last successfully completed drain.On startup, the last successfully completed drain is assumed to have an identifier of 0.
- Returns:
- last successfully completed drain.
-
getState
ConsistentRegionMXBean.State getState()
Returns a string indicating the current state of the consistent region.- Returns:
- state of the consistent region
-
reset
void reset(boolean force)
Requests a reset of the region to the last consistent state.
Ifforce
isfalse
and region has reached themaximum number of consecutive resets
then no action is taken.
Ifforce
istrue
then counter for the number of consecutive resets is reset to zero, and then the request to reset the region is made.
This call initiates the reset of the region, but does not wait for its completion.- Parameters:
force
-true
to force a reset attempt, otherwise request a reset only ifgetState()
does not returnConsistentRegionMXBean.State.MAXIMUM_RESET_ATTEMPTS_REACHED
.
-
-