public enum DriverStatus extends Enum<DriverStatus>
Enum Constant and Description |
---|
FAILING |
INIT |
PRE_INIT |
RUNNING |
SHUTTING_DOWN |
Modifier and Type | Method and Description |
---|---|
boolean |
isClosing()
Check if the driver is in process of shutting down (either gracefully or due to an error).
|
boolean |
isLegalTransition(DriverStatus toStatus)
Check whether a driver state transition from current state to a given one is legal.
|
static DriverStatus |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DriverStatus[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DriverStatus PRE_INIT
public static final DriverStatus INIT
public static final DriverStatus RUNNING
public static final DriverStatus SHUTTING_DOWN
public static final DriverStatus FAILING
public static DriverStatus[] values()
for (DriverStatus c : DriverStatus.values()) System.out.println(c);
public static DriverStatus valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic boolean isClosing()
public boolean isLegalTransition(DriverStatus toStatus)
toStatus
- Destination state.Copyright © 2017 The Apache Software Foundation. All rights reserved.