public abstract class OpenBuilderBase extends java.lang.Object implements OpenBuilder
| Modifier and Type | Field and Description |
|---|---|
protected DigestType |
digestType |
protected long |
ledgerId |
(package private) static org.slf4j.Logger |
LOG |
protected byte[] |
password |
protected boolean |
recovery |
| Constructor and Description |
|---|
OpenBuilderBase() |
| Modifier and Type | Method and Description |
|---|---|
protected int |
validate() |
OpenBuilder |
withDigestType(DigestType digestType)
Sets the expected digest type used to check the contents of the ledger.
|
OpenBuilder |
withLedgerId(long ledgerId)
Set the id of the ledger to be opened.
|
OpenBuilder |
withPassword(byte[] password)
Sets the password to be used to open the ledger.
|
OpenBuilder |
withRecovery(boolean recovery)
Define to open the ledger in recovery mode or in readonly mode.
|
static final org.slf4j.Logger LOG
protected boolean recovery
protected long ledgerId
protected byte[] password
protected DigestType digestType
public OpenBuilder withLedgerId(long ledgerId)
OpenBuilderwithLedgerId in interface OpenBuilderpublic OpenBuilder withRecovery(boolean recovery)
OpenBuilderwithRecovery in interface OpenBuilderrecovery - recovery modepublic OpenBuilder withPassword(byte[] password)
OpenBuilderwithPassword in interface OpenBuilderpassword - the password to unlock the ledgerpublic OpenBuilder withDigestType(DigestType digestType)
OpenBuilderDigestType.CRC32.
If ClientConfiguration.setEnableDigestTypeAutodetection(boolean) is set to true this value is ignored
and the digest type is read directly from metadatawithDigestType in interface OpenBuilderdigestType - the type of digestprotected int validate()
Copyright © 2011–2024 The Apache Software Foundation. All rights reserved.