com.atlassian.httpclient.apache.httpcomponents
Class FlushableHttpCacheStorage

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

public class FlushableHttpCacheStorage
extends java.lang.Object
implements org.apache.http.client.cache.HttpCacheStorage

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


Constructor Summary
FlushableHttpCacheStorage(org.apache.http.impl.client.cache.CacheConfig config)
           
 
Method Summary
 void flushByUriPattern(java.util.regex.Pattern urlPattern)
           
 org.apache.http.client.cache.HttpCacheEntry getEntry(java.lang.String url)
          Gets an entry from the cache, if it exists
 void putEntry(java.lang.String url, org.apache.http.client.cache.HttpCacheEntry entry)
          Places a HttpCacheEntry in the cache
 void removeEntry(java.lang.String url)
          Removes a HttpCacheEntry from the cache
 void updateEntry(java.lang.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

FlushableHttpCacheStorage

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

flushByUriPattern

public void flushByUriPattern(java.util.regex.Pattern urlPattern)

putEntry

public void putEntry(java.lang.String url,
                     org.apache.http.client.cache.HttpCacheEntry entry)
              throws java.io.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:
java.io.IOException

getEntry

public org.apache.http.client.cache.HttpCacheEntry getEntry(java.lang.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(java.lang.String url)
                 throws java.io.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:
java.io.IOException

updateEntry

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


Copyright © 2012-2013 Atlassian. All Rights Reserved.