Interface ParentComposite
- All Known Implementing Classes:
CompositeStorageImpl
@API(status=STABLE,
since="2.0.0-milestone.1.4")
public interface ParentComposite
Represents the parent storage that a
CompositeAwareChild
can use to propagate changes to.-
Method Summary
Modifier and TypeMethodDescriptionvoid
addToCache
(ResourceKey resource, long amount) Adds a resource to the composite storage cache.void
onSourceAddedToChild
(Storage source) Called by theCompositeAwareChild
to notify to this parent composite storage that a source has been added.void
onSourceRemovedFromChild
(Storage source) Called by theCompositeAwareChild
to notify to this parent composite storage that a source has been removed.void
removeFromCache
(ResourceKey resource, long amount) Removes a resource from the composite storage cache.
-
Method Details
-
onSourceAddedToChild
Called by theCompositeAwareChild
to notify to this parent composite storage that a source has been added.- Parameters:
source
- the source
-
onSourceRemovedFromChild
Called by theCompositeAwareChild
to notify to this parent composite storage that a source has been removed.- Parameters:
source
- the source
-
addToCache
Adds a resource to the composite storage cache.- Parameters:
resource
- the resourceamount
- the amount
-
removeFromCache
Removes a resource from the composite storage cache.- Parameters:
resource
- the resourceamount
- the amount
-