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 Details

    • onSourceAddedToChild

      void onSourceAddedToChild(Storage source)
      Called by the CompositeAwareChild to notify to this parent composite storage that a source has been added.
      Parameters:
      source - the source
    • onSourceRemovedFromChild

      void onSourceRemovedFromChild(Storage source)
      Called by the CompositeAwareChild to notify to this parent composite storage that a source has been removed.
      Parameters:
      source - the source
    • addToCache

      void addToCache(ResourceKey resource, long amount)
      Adds a resource to the composite storage cache.
      Parameters:
      resource - the resource
      amount - the amount
    • removeFromCache

      void removeFromCache(ResourceKey resource, long amount)
      Removes a resource from the composite storage cache.
      Parameters:
      resource - the resource
      amount - the amount