Module io.mokamint.node
Package io.mokamint.node
Class AbstractConsensusConfigBuilder<C extends ConsensusConfig<C,B>,B extends ConsensusConfigBuilder<C,B>>
java.lang.Object
io.mokamint.node.internal.ConsensusConfigImpl.ConsensusConfigBuilderImpl<C,B>
io.mokamint.node.AbstractConsensusConfigBuilder<C,B>
- Type Parameters:
C- the concrete type of the configurationB- the concrete type of the builder
- All Implemented Interfaces:
ConsensusConfigBuilder<C,B>
public abstract class AbstractConsensusConfigBuilder<C extends ConsensusConfig<C,B>,B extends ConsensusConfigBuilder<C,B>>
extends io.mokamint.node.internal.ConsensusConfigImpl.ConsensusConfigBuilderImpl<C,B>
The builder of a configuration object.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates the builder.protectedAbstractConsensusConfigBuilder(com.moandjiezana.toml.Toml toml) Reads the properties of the given TOML file and sets them for the corresponding fields of this builder.protectedAbstractConsensusConfigBuilder(ConsensusConfig<C, B> config) Creates a builder with properties initialized to those of the given configuration object. -
Method Summary
Methods inherited from class io.mokamint.node.internal.ConsensusConfigImpl.ConsensusConfigBuilderImpl
getTargetBlockCreationTime, getThis, readToml, setChainId, setHashingForBlocks, setHashingForDeadlines, setHashingForGenerations, setHashingForTransactions, setMaxBlockSize, setMaxTransactionSize, setOblivion, setSignatureForBlocks, setSignatureForDeadlines, setTargetBlockCreationTimeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.mokamint.node.api.ConsensusConfigBuilder
build
-
Constructor Details
-
AbstractConsensusConfigBuilder
Creates the builder.- Throws:
NoSuchAlgorithmException- if the configuration refers to some unknown hashing algorithm
-
AbstractConsensusConfigBuilder
protected AbstractConsensusConfigBuilder(com.moandjiezana.toml.Toml toml) throws NoSuchAlgorithmException Reads the properties of the given TOML file and sets them for the corresponding fields of this builder.- Parameters:
toml- the file- Throws:
NoSuchAlgorithmException- if the toml file refers to some unknown hashing algorithm
-
AbstractConsensusConfigBuilder
Creates a builder with properties initialized to those of the given configuration object.- Parameters:
config- the configuration object
-