Interface QuotaManagerStrategy

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean afterWritingCacheFile​(long contentSize)
      Called immediately after writing a cache file - specifying the size of the file that was written.
      boolean beforeWritingCacheFile​(long contentSize)
      Called immediately before writing a cache file or (when cacheOnInBound is set to true for the CachingContentStore) before handing a ContentWriter to a content producer.
    • Method Detail

      • beforeWritingCacheFile

        boolean beforeWritingCacheFile​(long contentSize)
        Called immediately before writing a cache file or (when cacheOnInBound is set to true for the CachingContentStore) before handing a ContentWriter to a content producer.

        In the latter case, the contentSize will be unknown (0), since the content length hasn't been established yet.

        Parameters:
        contentSize - The size of the content that will be written or 0 if not known.
        Returns:
        true to allow the cache file to be written, false to veto.
      • afterWritingCacheFile

        boolean afterWritingCacheFile​(long contentSize)
        Called immediately after writing a cache file - specifying the size of the file that was written. The return value allows implementations control over whether the new cache file is kept (true) or immediately removed (false).
        Parameters:
        contentSize - The size of the content that was written.
        Returns:
        true to allow the cache file to remain, false to immediately delete.