Class UnlimitedQuotaStrategy
java.lang.Object
org.alfresco.repo.content.caching.quota.UnlimitedQuotaStrategy
- All Implemented Interfaces:
QuotaManagerStrategy
QuotaManagerStrategy that doesn't enforce any quota limits whatsoever.
- Author:
- Matt Ward
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanafterWritingCacheFile(long contentSize) Called immediately after writing a cache file - specifying the size of the file that was written.booleanbeforeWritingCacheFile(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.
-
Constructor Details
-
UnlimitedQuotaStrategy
public UnlimitedQuotaStrategy()
-
-
Method Details
-
beforeWritingCacheFile
public boolean beforeWritingCacheFile(long contentSize) Description copied from interface:QuotaManagerStrategyCalled 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:
beforeWritingCacheFilein interfaceQuotaManagerStrategy- 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:QuotaManagerStrategyCalled 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:
afterWritingCacheFilein interfaceQuotaManagerStrategy- Parameters:
contentSize- The size of the content that was written.- Returns:
- true to allow the cache file to remain, false to immediately delete.
-