Package org.apache.bookkeeper.meta
Class LedgerLayout
java.lang.Object
org.apache.bookkeeper.meta.LedgerLayout
This class encapsulates ledger layout information that is persistently stored
in registration service. It provides parsing and serialization methods of such
information.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionLedgerLayout(String managerFactoryCls, int managerVersion) Ledger Layout Constructor.LedgerLayout(String managerFactoryCls, int managerVersion, int layoutVersion) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanintintinthashCode()static LedgerLayoutparseLayout(byte[] bytes) Parses a given byte array and transforms into a LedgerLayout object.byte[]Generates a byte array based on the LedgerLayout object.toString()
-
Field Details
-
LAYOUT_MIN_COMPAT_VERSION
public static final int LAYOUT_MIN_COMPAT_VERSION- See Also:
-
LAYOUT_FORMAT_VERSION
public static final int LAYOUT_FORMAT_VERSION- See Also:
-
-
Constructor Details
-
LedgerLayout
Ledger Layout Constructor.- Parameters:
managerFactoryCls- Ledger Manager Factory ClassmanagerVersion- Ledger Manager Version
-
LedgerLayout
LedgerLayout(String managerFactoryCls, int managerVersion, int layoutVersion)
-
-
Method Details
-
serialize
Generates a byte array based on the LedgerLayout object.- Returns:
- byte[]
- Throws:
IOException
-
parseLayout
Parses a given byte array and transforms into a LedgerLayout object.- Parameters:
bytes- byte array to parse- Returns:
- LedgerLayout
- Throws:
IOException- if the given byte[] cannot be parsed
-
getManagerFactoryClass
-
getManagerVersion
public int getManagerVersion() -
getLayoutFormatVersion
public int getLayoutFormatVersion() -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-