Interface StorageProvider


@API(status=STABLE, since="2.0.0-milestone.1.2") public interface StorageProvider
Implement this on NetworkNodes that can provide a storage to the network. Never modify a RootStorage from a NetworkNode directly. Use this interface to help you manage the lifecycle of your storage, to ensure that your storage is added or removed in the right cases. Use a CompositeStorage to conditionally enable/disable a provided Storage.
  • Method Summary

    Modifier and Type
    Method
    Description
    This method is called when a NetworkNode is added or removed from a network.
  • Method Details

    • getStorage

      Storage getStorage()
      This method is called when a NetworkNode is added or removed from a network.
      Returns:
      the storage