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 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 String
ITEM_CODE
static String
ITEM_ID
static String
ITEM_MESSAGE
static String[]
ITEM_NAMES
static CompositeType
ITEM_TYPES
-
Method Summary
-
-
-
Field Detail
-
ITEM_CODE
public static final String ITEM_CODE
- See Also:
- Constant Field Values
-
ITEM_ID
public static final String ITEM_ID
- See Also:
- Constant Field Values
-
ITEM_MESSAGE
public static final String ITEM_MESSAGE
- See Also:
- Constant Field Values
-
ITEM_NAMES
public static final String[] ITEM_NAMES
-
ITEM_TYPES
public static final CompositeType ITEM_TYPES
-
-
Method Detail
-
unavailable
public static ManagementOperation.Status unavailable(String message)
-
none
public static ManagementOperation.Status none(String message)
-
initiated
public static ManagementOperation.Status initiated(String message)
-
running
public static ManagementOperation.Status running(String message)
-
succeeded
public static ManagementOperation.Status succeeded(String message)
-
failed
public static ManagementOperation.Status failed(String message)
-
unavailable
public static ManagementOperation.Status unavailable(ManagementOperation<?> op, String message)
-
none
public static ManagementOperation.Status none(ManagementOperation<?> op, String message)
-
initiated
public static ManagementOperation.Status initiated(ManagementOperation<?> op, String message)
-
running
public static ManagementOperation.Status running(ManagementOperation<?> op, String message)
-
succeeded
public static ManagementOperation.Status succeeded(ManagementOperation<?> op, String message)
-
failed
public static ManagementOperation.Status failed(ManagementOperation<?> op, String message)
-
formatTime
public static 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(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:
IllegalArgumentException
- ifstatus
is not a valid encoding of aStatus
.
-
toCompositeData
public CompositeData toCompositeData()
Utility method for converting this instance to aCompositeData
encoding of the respective status.- Returns:
CompositeData
of thisStatus
-
toTabularData
public static TabularData toTabularData(Iterable<ManagementOperation.Status> statuses)
-
getCode
public RepositoryManagementMBean.StatusCode getCode()
-
getId
public int getId()
-
getName
public String getName()
-
getMessage
public String getMessage()
-
isSuccess
public boolean isSuccess()
-
isFailure
public boolean isFailure()
-
-