Class ManagementOperation.Status
- java.lang.Object
-
- org.apache.jackrabbit.oak.commons.jmx.ManagementOperation.Status
-
- Enclosing class:
- ManagementOperation<R>
public static final class ManagementOperation.Status extends java.lang.Object
Status of aManagementOperation
. One ofunavailable(String)
,none(String)
,initiated(String)
,running(String)
,succeeded(String)
andfailed(String)
, the semantics of which correspond to the respective status codes inRepositoryManagementMBean
.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ITEM_CODE
static java.lang.String
ITEM_ID
static java.lang.String
ITEM_MESSAGE
static java.lang.String[]
ITEM_NAMES
static javax.management.openmbean.CompositeType
ITEM_TYPES
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object that)
static ManagementOperation.Status
failed(java.lang.String message)
static ManagementOperation.Status
failed(ManagementOperation<?> op, java.lang.String message)
static java.lang.String
formatTime(long nanos)
Utility method for formatting a duration in nano seconds into a human readable string.static ManagementOperation.Status
fromCompositeData(javax.management.openmbean.CompositeData status)
Utility method for converting aCompositeData
encoding of a status to aStatus
instance.RepositoryManagementMBean.StatusCode
getCode()
int
getId()
java.lang.String
getMessage()
java.lang.String
getName()
int
hashCode()
static ManagementOperation.Status
initiated(java.lang.String message)
static ManagementOperation.Status
initiated(ManagementOperation<?> op, java.lang.String message)
boolean
isFailure()
boolean
isSuccess()
static ManagementOperation.Status
none(java.lang.String message)
static ManagementOperation.Status
none(ManagementOperation<?> op, java.lang.String message)
static ManagementOperation.Status
running(java.lang.String message)
static ManagementOperation.Status
running(ManagementOperation<?> op, java.lang.String message)
static ManagementOperation.Status
succeeded(java.lang.String message)
static ManagementOperation.Status
succeeded(ManagementOperation<?> op, java.lang.String message)
javax.management.openmbean.CompositeData
toCompositeData()
Utility method for converting this instance to aCompositeData
encoding of the respective status.java.lang.String
toString()
static javax.management.openmbean.TabularData
toTabularData(java.lang.Iterable<ManagementOperation.Status> statuses)
static ManagementOperation.Status
unavailable(java.lang.String message)
static ManagementOperation.Status
unavailable(ManagementOperation<?> op, java.lang.String message)
-
-
-
Field Detail
-
ITEM_CODE
public static final java.lang.String ITEM_CODE
- See Also:
- Constant Field Values
-
ITEM_ID
public static final java.lang.String ITEM_ID
- See Also:
- Constant Field Values
-
ITEM_MESSAGE
public static final java.lang.String ITEM_MESSAGE
- See Also:
- Constant Field Values
-
ITEM_NAMES
public static final java.lang.String[] ITEM_NAMES
-
ITEM_TYPES
public static final javax.management.openmbean.CompositeType ITEM_TYPES
-
-
Method Detail
-
unavailable
public static ManagementOperation.Status unavailable(java.lang.String message)
-
none
public static ManagementOperation.Status none(java.lang.String message)
-
initiated
public static ManagementOperation.Status initiated(java.lang.String message)
-
running
public static ManagementOperation.Status running(java.lang.String message)
-
succeeded
public static ManagementOperation.Status succeeded(java.lang.String message)
-
failed
public static ManagementOperation.Status failed(java.lang.String message)
-
unavailable
public static ManagementOperation.Status unavailable(ManagementOperation<?> op, java.lang.String message)
-
none
public static ManagementOperation.Status none(ManagementOperation<?> op, java.lang.String message)
-
initiated
public static ManagementOperation.Status initiated(ManagementOperation<?> op, java.lang.String message)
-
running
public static ManagementOperation.Status running(ManagementOperation<?> op, java.lang.String message)
-
succeeded
public static ManagementOperation.Status succeeded(ManagementOperation<?> op, java.lang.String message)
-
failed
public static ManagementOperation.Status failed(ManagementOperation<?> op, java.lang.String message)
-
formatTime
public static java.lang.String formatTime(long nanos)
Utility method for formatting a duration in nano seconds into a human readable string.- Parameters:
nanos
- number of nano seconds- Returns:
- human readable string
-
fromCompositeData
public static ManagementOperation.Status fromCompositeData(javax.management.openmbean.CompositeData status)
Utility method for converting aCompositeData
encoding of a status to aStatus
instance.- Parameters:
status
-CompositeData
encoding of a status- Returns:
Status
forstatus
- Throws:
java.lang.IllegalArgumentException
- ifstatus
is not a valid encoding of aStatus
.
-
toCompositeData
public javax.management.openmbean.CompositeData toCompositeData()
Utility method for converting this instance to aCompositeData
encoding of the respective status.- Returns:
CompositeData
of thisStatus
-
toTabularData
public static javax.management.openmbean.TabularData toTabularData(java.lang.Iterable<ManagementOperation.Status> statuses)
-
getCode
public RepositoryManagementMBean.StatusCode getCode()
-
getId
public int getId()
-
getName
public java.lang.String getName()
-
getMessage
public java.lang.String getMessage()
-
isSuccess
public boolean isSuccess()
-
isFailure
public boolean isFailure()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object that)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-