Class UnlimitedQuotaStrategy

java.lang.Object
org.alfresco.repo.content.caching.quota.UnlimitedQuotaStrategy
All Implemented Interfaces:
QuotaManagerStrategy

public class UnlimitedQuotaStrategy extends Object implements QuotaManagerStrategy
QuotaManagerStrategy that doesn't enforce any quota limits whatsoever.
Author:
Matt Ward
  • Constructor Details

    • UnlimitedQuotaStrategy

      public UnlimitedQuotaStrategy()
  • Method Details

    • beforeWritingCacheFile

      public boolean beforeWritingCacheFile(long contentSize)
      Description copied from interface: QuotaManagerStrategy
      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.

      Specified by:
      beforeWritingCacheFile in interface QuotaManagerStrategy
      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

      public boolean afterWritingCacheFile(long contentSize)
      Description copied from interface: QuotaManagerStrategy
      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).
      Specified by:
      afterWritingCacheFile in interface QuotaManagerStrategy
      Parameters:
      contentSize - The size of the content that was written.
      Returns:
      true to allow the cache file to remain, false to immediately delete.