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 configuration
B - 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

    Constructors
    Modifier
    Constructor
    Description
    protected
    Creates the builder.
    protected
    AbstractConsensusConfigBuilder(com.moandjiezana.toml.Toml toml)
    Reads the properties of the given TOML file and sets them for the corresponding fields of this builder.
    protected
    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, setTargetBlockCreationTime

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.mokamint.node.api.ConsensusConfigBuilder

    build
  • Constructor Details

    • AbstractConsensusConfigBuilder

      protected AbstractConsensusConfigBuilder() throws NoSuchAlgorithmException
      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

      protected AbstractConsensusConfigBuilder(ConsensusConfig<C,B> config)
      Creates a builder with properties initialized to those of the given configuration object.
      Parameters:
      config - the configuration object