org.apache.http.impl.client.cache
Class ImmediateSchedulingStrategy

java.lang.Object
  extended by org.apache.http.impl.client.cache.ImmediateSchedulingStrategy
All Implemented Interfaces:
Closeable, SchedulingStrategy

@Contract(threading=SAFE)
public class ImmediateSchedulingStrategy
extends Object
implements SchedulingStrategy

Immediately schedules any incoming validation request. Relies on CacheConfig to configure the used ThreadPoolExecutor.

Since:
4.3

Constructor Summary
ImmediateSchedulingStrategy(CacheConfig cacheConfig)
          Uses a ThreadPoolExecutor which is configured according to the given CacheConfig.
 
Method Summary
 void close()
           
 void schedule(AsynchronousValidationRequest revalidationRequest)
          Schedule an AsynchronousValidationRequest to be executed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImmediateSchedulingStrategy

public ImmediateSchedulingStrategy(CacheConfig cacheConfig)
Uses a ThreadPoolExecutor which is configured according to the given CacheConfig.

Parameters:
cacheConfig - specifies thread pool settings. See CacheConfig.getAsynchronousWorkersMax(), CacheConfig.getAsynchronousWorkersCore(), CacheConfig.getAsynchronousWorkerIdleLifetimeSecs(), and CacheConfig.getRevalidationQueueSize().
Method Detail

schedule

public void schedule(AsynchronousValidationRequest revalidationRequest)
Description copied from interface: SchedulingStrategy
Schedule an AsynchronousValidationRequest to be executed.

Specified by:
schedule in interface SchedulingStrategy
Parameters:
revalidationRequest - the request to be executed; not null

close

public void close()
Specified by:
close in interface Closeable


Copyright © 2010–2018 The Apache Software Foundation. All rights reserved.