Interface NodeStorageInterface

All Superinterfaces:
L2pStorageInterface
All Known Implementing Classes:
EthereumNode, LocalNode, Node, PastryNodeImpl

public interface NodeStorageInterface
extends L2pStorageInterface
  • Method Details

    • storeEnvelope

      void storeEnvelope​(EnvelopeVersion envelope, AgentImpl author) throws EnvelopeException
      Stores the given Envelope in the network. The content is signed with the key from the given author. If an exception occurs its wrapped as StorageException. With this method collisions are handled by throwing an EnvelopeAlreadyExistsException. This method uses the default timeout defined by the acting node.
      Parameters:
      envelope - The Envelope to store in the network.
      author - The author that is used to sign the content.
      Throws:
      EnvelopeException - If an issue with the storage occurs.
    • fetchEnvelope

      EnvelopeVersion fetchEnvelope​(java.lang.String identifier) throws EnvelopeNotFoundException, EnvelopeException
      Fetches the latest version for the given identifier from the network. This method uses the default timeout defined by the acting node.
      Parameters:
      identifier - An unique identifier for the Envelope.
      Returns:
      Returns the fetched Envelope from the network.
      Throws:
      EnvelopeNotFoundException - If no envelope or any part of it was not found in the network.
      EnvelopeException - If an issue with the storage occurs.