Package org.apache.bookkeeper.client.api
Enum LedgerMetadata.State
- java.lang.Object
-
- java.lang.Enum<LedgerMetadata.State>
-
- org.apache.bookkeeper.client.api.LedgerMetadata.State
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<LedgerMetadata.State>
- Enclosing interface:
- LedgerMetadata
public static enum LedgerMetadata.State extends java.lang.Enum<LedgerMetadata.State>
Possible metadata states.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CLOSED
The ledger is closed.IN_RECOVERY
A reader has tried to, or may be trying to recover the ledger.OPEN
The ledger is open.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static LedgerMetadata.State
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static LedgerMetadata.State[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
OPEN
public static final LedgerMetadata.State OPEN
The ledger is open. New entry may be added to it.
-
IN_RECOVERY
public static final LedgerMetadata.State IN_RECOVERY
A reader has tried to, or may be trying to recover the ledger. The writer may be able to add new entries if fencing hasn't already occurred, but any attempt to change ensemble will fail and the write will be forced to close the ledger.
-
CLOSED
public static final LedgerMetadata.State CLOSED
The ledger is closed. No new entries may be added to it. The length and lastEntryId are fixed. Ensembles may change, but only for rereplication.
-
-
Method Detail
-
values
public static LedgerMetadata.State[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (LedgerMetadata.State c : LedgerMetadata.State.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static LedgerMetadata.State valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-