List of usage examples for org.apache.http.impl.client.cache CacheKeyGenerator CacheKeyGenerator
CacheKeyGenerator
From source file:org.apache.http.impl.client.cache.AsynchronousAsyncValidator.java
/** * Create AsynchronousValidator which will make revalidation requests using * the supplied {@link CachingHttpAsyncClient} and {@link ExecutorService}. * * @param cachingClient// w ww .j a va 2s .c o m * used to execute asynchronous requests * @param executor * used to manage a thread pool of revalidation workers */ AsynchronousAsyncValidator(final CachingHttpAsyncClient cachingClient, final ExecutorService executor) { this.cachingAsyncClient = cachingClient; this.executor = executor; this.queued = new HashSet<String>(); this.cacheKeyGenerator = new CacheKeyGenerator(); }
From source file:org.apache.http.impl.client.cache.AsynchronousValidator.java
/** * Create AsynchronousValidator which will make revalidation requests * using the supplied {@link CachingHttpClient} and * {@link ExecutorService}.//ww w . ja v a 2 s. co m * @param cachingClient used to execute asynchronous requests * @param executor used to manage a thread pool of revalidation workers */ AsynchronousValidator(CachingHttpClient cachingClient, ExecutorService executor) { this.cachingClient = cachingClient; this.executor = executor; this.queued = new HashSet<String>(); this.cacheKeyGenerator = new CacheKeyGenerator(); }
From source file:org.apache.http.impl.client.cache.BasicHttpCache.java
public BasicHttpCache(ResourceFactory resourceFactory, HttpCacheStorage storage, CacheConfig config) { this.resourceFactory = resourceFactory; this.uriExtractor = new CacheKeyGenerator(); this.cacheEntryUpdater = new CacheEntryUpdater(resourceFactory); this.maxObjectSizeBytes = config.getMaxObjectSizeBytes(); this.responseGenerator = new CachedHttpResponseGenerator(); this.storage = storage; this.cacheInvalidator = new CacheInvalidator(this.uriExtractor, this.storage); }