Scheduled thread pool executor implementing a dynamic allocation of threads.
When the numbers of running threads reaches the maximum pool size, further commands are queued
for later execution.
Created by davide-maestroni on 1/23/15.
corePoolSize the number of threads to keep in the pool, even if they are idle.
maximumPoolSize the maximum number of threads to allow in the pool.
keepAliveTime when the number of threads is greater than the core, this is the
maximum time that excess idle threads will wait for new tasks before
keepAliveUnit the time unit for the keep alive time.
return super.schedule(new CommandRunnable(mExecutor, command), delay, unit);
Runnable executing another runnable.
executor the executor instance.
command the command to execute.
Handler of rejected execution queueing the rejected command.
queue the command queue.
Implementation of a blocking queue rejecting the addition of any new element.
public boolean offer(final Runnable runnable, final long timeout,