org.apache.archiva.policies.urlcache
Class DefaultUrlFailureCache

java.lang.Object
  extended by org.apache.archiva.policies.urlcache.DefaultUrlFailureCache
All Implemented Interfaces:
UrlFailureCache

@Service(value="urlFailureCache")
public class DefaultUrlFailureCache
extends Object
implements UrlFailureCache

DefaultUrlFailureCache


Field Summary
private  org.apache.archiva.redback.components.cache.Cache urlCache
           
 
Constructor Summary
DefaultUrlFailureCache(org.apache.archiva.redback.components.cache.Cache urlCache)
           
 
Method Summary
 void cacheFailure(String url)
          Store a URL in the cache as failed.
 boolean hasFailedBefore(String url)
          Test if a specified URL has failed before.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

urlCache

private org.apache.archiva.redback.components.cache.Cache urlCache
Constructor Detail

DefaultUrlFailureCache

@Inject
public DefaultUrlFailureCache(@Named(value="cache#url-failures-cache")
                                     org.apache.archiva.redback.components.cache.Cache urlCache)
Method Detail

cacheFailure

public void cacheFailure(String url)
Description copied from interface: UrlFailureCache
Store a URL in the cache as failed.

Specified by:
cacheFailure in interface UrlFailureCache
Parameters:
url - the url to store.

hasFailedBefore

public boolean hasFailedBefore(String url)
Description copied from interface: UrlFailureCache
Test if a specified URL has failed before. NOTE: If the provided URL has failed, then making this call should refresh the expiration time on that URL entry.

Specified by:
hasFailedBefore in interface UrlFailureCache
Parameters:
url - the URL to test.
Returns:
true if it has failed before, false if not.


Copyright © 2006-2013 The Apache Software Foundation. All Rights Reserved.