com.atlassian.httpclient.apache.httpcomponents.cache
Class FlushableHttpCacheStorageImpl

java.lang.Object
  extended by com.atlassian.httpclient.apache.httpcomponents.cache.FlushableHttpCacheStorageImpl
All Implemented Interfaces:
FlushableHttpCacheStorage, org.apache.http.client.cache.HttpCacheStorage

public final class FlushableHttpCacheStorageImpl
extends Object
implements FlushableHttpCacheStorage

Originally copied from BasicHttpCacheStorage v4.1.2 Have added ability to flush cache


Constructor Summary
FlushableHttpCacheStorageImpl(org.apache.http.impl.client.cache.CacheConfig config)
           
 
Method Summary
 void flushByUriPattern(Pattern urlPattern)
           
 org.apache.http.client.cache.HttpCacheEntry getEntry(String url)
          Gets an entry from the cache, if it exists
 void putEntry(String url, org.apache.http.client.cache.HttpCacheEntry entry)
          Places a HttpCacheEntry in the cache
 void removeEntry(String url)
          Removes a HttpCacheEntry from the cache
 void updateEntry(String url, org.apache.http.client.cache.HttpCacheUpdateCallback callback)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlushableHttpCacheStorageImpl

public FlushableHttpCacheStorageImpl(org.apache.http.impl.client.cache.CacheConfig config)
Method Detail

flushByUriPattern

public void flushByUriPattern(Pattern urlPattern)
Specified by:
flushByUriPattern in interface FlushableHttpCacheStorage

putEntry

public void putEntry(String url,
                     org.apache.http.client.cache.HttpCacheEntry entry)
              throws IOException
Places a HttpCacheEntry in the cache

Specified by:
putEntry in interface org.apache.http.client.cache.HttpCacheStorage
Parameters:
url - Url to use as the cache key
entry - HttpCacheEntry to place in the cache
Throws:
IOException

getEntry

public org.apache.http.client.cache.HttpCacheEntry getEntry(String url)
Gets an entry from the cache, if it exists

Specified by:
getEntry in interface org.apache.http.client.cache.HttpCacheStorage
Parameters:
url - Url that is the cache key
Returns:
HttpCacheEntry if one exists, or null for cache miss

removeEntry

public void removeEntry(String url)
                 throws IOException
Removes a HttpCacheEntry from the cache

Specified by:
removeEntry in interface org.apache.http.client.cache.HttpCacheStorage
Parameters:
url - Url that is the cache key
Throws:
IOException

updateEntry

public void updateEntry(String url,
                        org.apache.http.client.cache.HttpCacheUpdateCallback callback)
                 throws IOException
Specified by:
updateEntry in interface org.apache.http.client.cache.HttpCacheStorage
Throws:
IOException


Copyright © 2012–2015 Atlassian. All rights reserved.