Package org.apache.bookkeeper.util
Class LedgerIdFormatter
java.lang.Object
org.apache.bookkeeper.util.LedgerIdFormatter
- Direct Known Subclasses:
LedgerIdFormatter.HexLedgerIdFormatter,LedgerIdFormatter.LongLedgerIdFormatter,LedgerIdFormatter.UUIDLedgerIdFormatter
Formatter to format a ledgerId.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classhex ledgerId formatter.static classlong ledgerId formatter.static classuuid ledgerId formatter. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract StringformatLedgerId(long ledgerId) Formats the LedgerId according to the type of the Formatter and return it in String format.static LedgerIdFormatternewLedgerIdFormatter(String opt, AbstractConfiguration conf) static LedgerIdFormatterabstract longreadLedgerId(String ledgerIdString) converts the ledgeridString, which is in format of the type of formatter, to the long value.
-
Field Details
-
LONG_LEDGERID_FORMATTER
-
-
Constructor Details
-
LedgerIdFormatter
public LedgerIdFormatter()
-
-
Method Details
-
formatLedgerId
Formats the LedgerId according to the type of the Formatter and return it in String format.- Parameters:
ledgerId-- Returns:
-
readLedgerId
converts the ledgeridString, which is in format of the type of formatter, to the long value.- Parameters:
ledgerIdString-- Returns:
-
newLedgerIdFormatter
-
newLedgerIdFormatter
-