Package com.softwareag.connectivity
Interface StatusReporter.StatusItem
-
- Enclosing interface:
- StatusReporter
public static interface StatusReporter.StatusItem
An interface that can be used to efficiently update the value associated with a single status key. Only one StatusItem instance can exist for a given key. This object is thread-safe. Ensure that no methods are called this object after the plug-in has been shutdown.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getKey()
Get the unique key specified when this status item was createdjava.lang.String
getStatus()
Return the value this status item was set to most recently by this class.void
increment()
Set an integer status value by incrementing the previous integer value that was set by this object.void
increment(long incrementValue)
Set an integer status value by incrementing the previous integer value that was set by this object.void
setStatus(long value)
Set an integer status value.void
setStatus(java.lang.String value)
Set a string status value.
-
-
-
Method Detail
-
setStatus
void setStatus(java.lang.String value)
Set a string status value.- Parameters:
value
- the value to set e.g.StatusReporter.STATUS_ONLINE
,StatusReporter.STATUS_ONLINE
,StatusReporter.STATUS_FAILED
. Must not be null.
-
setStatus
void setStatus(long value)
Set an integer status value. This is a convenience method that converts an integer value into a string automatically.- Parameters:
value
- the value to set
-
getStatus
java.lang.String getStatus()
Return the value this status item was set to most recently by this class.- Returns:
- The last value this was set to.
-
increment
void increment()
Set an integer status value by incrementing the previous integer value that was set by this object.
-
increment
void increment(long incrementValue)
Set an integer status value by incrementing the previous integer value that was set by this object.- Parameters:
incrementValue
- the value to add on to the current value and set as the status. This can be a negative number.
-
getKey
java.lang.String getKey()
Get the unique key specified when this status item was created
-
-