Interface MokamintNode<E extends io.mokamint.node.api.PublicNode>

Type Parameters:
E - the type of the underlying Mokamint engine
All Superinterfaces:
AutoCloseable, LocalNode<MokamintNodeConfig>, io.hotmoka.node.api.Node, io.hotmoka.closeables.api.OnCloseHandlersContainer

public interface MokamintNode<E extends io.mokamint.node.api.PublicNode> extends LocalNode<MokamintNodeConfig>
A Hotmoka node that relies on the Mokamint proof of space engine.
  • Method Summary

    Modifier and Type
    Method
    Description
    Yields the Mokamint engine used by this node, if it has been already set.
    void
    Sets the Mokamint engine that must be used by this node.

    Methods inherited from interface io.hotmoka.node.local.api.LocalNode

    getLocalConfig

    Methods inherited from interface io.hotmoka.node.api.Node

    addConstructorCallTransaction, addGameteCreationTransaction, addInitializationTransaction, addInstanceMethodCallTransaction, addJarStoreInitialTransaction, addJarStoreTransaction, addStaticMethodCallTransaction, close, getClassTag, getConfig, getIndex, getInfo, getManifest, getPolledResponse, getRequest, getResponse, getState, getTakamakaCode, postConstructorCallTransaction, postInstanceMethodCallTransaction, postJarStoreTransaction, postStaticMethodCallTransaction, runInstanceMethodCallTransaction, runStaticMethodCallTransaction, subscribeToEvents

    Methods inherited from interface io.hotmoka.closeables.api.OnCloseHandlersContainer

    addOnCloseHandler, removeOnCloseHandler
  • Method Details

    • setMokamintEngine

      void setMokamintEngine(E engine) throws TimeoutException, InterruptedException, io.mokamint.node.api.ClosedNodeException
      Sets the Mokamint engine that must be used by this node.
      Parameters:
      engine - the Mokamint engine
      Throws:
      io.mokamint.node.api.ClosedNodeException - if engine is already closed
      InterruptedException - if the current thread gets interrupted while performing the operation
      TimeoutException - if the operation times out
    • getMokamintEngine

      Optional<E> getMokamintEngine()
      Yields the Mokamint engine used by this node, if it has been already set.
      Returns:
      the Mokamint engine, if already set