org.alfresco.repo.content.caching.quota
Class UnlimitedQuotaStrategy

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

public class UnlimitedQuotaStrategy
extends java.lang.Object
implements QuotaManagerStrategy

QuotaManagerStrategy that doesn't enforce any quota limits whatsoever.


Constructor Summary
UnlimitedQuotaStrategy()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnlimitedQuotaStrategy

public UnlimitedQuotaStrategy()
Method Detail

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.


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.