Package com.wombat.mama
Class MamaThrottleInstance
- java.lang.Object
-
- com.wombat.mama.MamaThrottleInstance
-
public final class MamaThrottleInstance extends java.lang.Object
This class provides an enumeration of types and methods for MAMA throttle instance. Used with setOutboundThrottle and getOutboundThrottle in the JNI version of the API. Enum to determine into which throttle a call applies. Currently the default throttle, used by the publisher, and the initial value request throttle are the same. Mama sends recap requests on a separate throttle.
-
-
Field Summary
Fields Modifier and Type Field Description static MamaThrottleInstance
DEFAULT_THROTTLE
static int
DEFAULT_THROTTLE_VALUE
The default throttle queuestatic MamaThrottleInstance
INITIAL_THROTTLE
static int
INITIAL_THROTTLE_VALUE
The initial value throttle queuestatic MamaThrottleInstance
RECAP_THROTTLE
static int
RECAP_THROTTLE_VALUE
The recap throttle queue
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MamaThrottleInstance
enumObjectForValue(int value)
Return an instance of a MamaMdMsgType corresponding to the specified integer value.boolean
equals(MamaThrottleInstance throttleInstance)
Compare the two types for equality.int
getValue()
Returns the integer value for the type.java.lang.String
toString()
Returns the stringified name for the enumerated type.static java.lang.String
valueToString(int value)
Utility method for mapping type integer values to corresponding string values.
-
-
-
Field Detail
-
DEFAULT_THROTTLE_VALUE
public static final int DEFAULT_THROTTLE_VALUE
The default throttle queue- See Also:
- Constant Field Values
-
DEFAULT_THROTTLE
public static final MamaThrottleInstance DEFAULT_THROTTLE
-
INITIAL_THROTTLE_VALUE
public static final int INITIAL_THROTTLE_VALUE
The initial value throttle queue- See Also:
- Constant Field Values
-
INITIAL_THROTTLE
public static final MamaThrottleInstance INITIAL_THROTTLE
-
RECAP_THROTTLE_VALUE
public static final int RECAP_THROTTLE_VALUE
The recap throttle queue- See Also:
- Constant Field Values
-
RECAP_THROTTLE
public static final MamaThrottleInstance RECAP_THROTTLE
-
-
Method Detail
-
toString
public java.lang.String toString()
Returns the stringified name for the enumerated type.- Overrides:
toString
in classjava.lang.Object
- Returns:
- Name for the type.
-
getValue
public int getValue()
Returns the integer value for the type. This value can be used in switch statements against the public XXX_VALUE static members of the class.- Returns:
- The integer type.
-
equals
public boolean equals(MamaThrottleInstance throttleInstance)
Compare the two types for equality. Returns true if the integer value of both types is equal. Otherwise returns false.- Parameters:
throttleInstance
- The object to check equality against.- Returns:
- Whether the two objects are equal.
-
valueToString
public static java.lang.String valueToString(int value)
Utility method for mapping type integer values to corresponding string values. Returns "UNKNOWN" is the int type value is not recognised.- Parameters:
value
- The int value for a MamaThrottleInstance.- Returns:
- The string name value of the specified MamaThrottleInstance integer value.
-
enumObjectForValue
public static MamaThrottleInstance enumObjectForValue(int value)
Return an instance of a MamaMdMsgType corresponding to the specified integer value. Returns null if the integer value is not recognised.- Parameters:
value
- Int value for a MamaThrottleInstance.- Returns:
- Instance of a MamaThrottleInstance if a mapping exists.
-
-