Interface StorageProvider

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@API(status=STABLE, since="2.0.0-milestone.1.2") @FunctionalInterface 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