List of usage examples for org.apache.http.impl.client.cache CacheConfig getRevalidationQueueSize
public int getRevalidationQueueSize()
From source file:org.apache.http.impl.client.cache.AsynchronousAsyncValidator.java
/** * Create AsynchronousValidator which will make revalidation requests using * the supplied {@link CachingHttpAsyncClient}, and a {@link ThreadPoolExecutor} * generated according to the thread pool settings provided in the given * {@link CacheConfig}./*from w w w . j a va 2 s .c o m*/ * * @param cachingClient * used to execute asynchronous requests * @param config * specifies thread pool settings. See * {@link CacheConfig#getAsynchronousWorkersMax()}, * {@link CacheConfig#getAsynchronousWorkersCore()}, * {@link CacheConfig#getAsynchronousWorkerIdleLifetimeSecs()}, * and {@link CacheConfig#getRevalidationQueueSize()}. */ public AsynchronousAsyncValidator(final CachingHttpAsyncClient cachingClient, final CacheConfig config) { this(cachingClient, new ThreadPoolExecutor(config.getAsynchronousWorkersCore(), config.getAsynchronousWorkersMax(), config.getAsynchronousWorkerIdleLifetimeSecs(), TimeUnit.SECONDS, new ArrayBlockingQueue<Runnable>(config.getRevalidationQueueSize()))); }
From source file:org.apache.http.impl.client.cache.AsynchronousValidator.java
/** * Create AsynchronousValidator which will make revalidation requests * using the supplied {@link CachingHttpClient}, and * a {@link ThreadPoolExecutor} generated according to the thread * pool settings provided in the given {@link CacheConfig}. * @param cachingClient used to execute asynchronous requests * @param config specifies thread pool settings. See * {@link CacheConfig#getAsynchronousWorkersMax()}, * {@link CacheConfig#getAsynchronousWorkersCore()}, * {@link CacheConfig#getAsynchronousWorkerIdleLifetimeSecs()}, * and {@link CacheConfig#getRevalidationQueueSize()}. */// ww w . j ava 2 s .c o m public AsynchronousValidator(CachingHttpClient cachingClient, CacheConfig config) { this(cachingClient, new ThreadPoolExecutor(config.getAsynchronousWorkersCore(), config.getAsynchronousWorkersMax(), config.getAsynchronousWorkerIdleLifetimeSecs(), TimeUnit.SECONDS, new ArrayBlockingQueue<Runnable>(config.getRevalidationQueueSize()))); }