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
NetworkNode
s 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 TypeMethodDescriptionThis method is called when aNetworkNode
is added or removed from a network.
-
Method Details
-
getStorage
Storage getStorage()This method is called when aNetworkNode
is added or removed from a network.- Returns:
- the storage
-