public class OrderedScheduler extends OrderedExecutor implements java.util.concurrent.ScheduledExecutorService
Object.hashCode()
method.| Modifier and Type | Class and Description |
|---|---|
(package private) class |
OrderedScheduler.OrderedSchedulerDecoratedThread |
static class |
OrderedScheduler.SchedulerBuilder
Builder to build ordered scheduler.
|
OrderedExecutor.AbstractBuilder<T extends OrderedExecutor>, OrderedExecutor.Builder, OrderedExecutor.ContextPreservingCallable<T>, OrderedExecutor.ContextPreservingRunnable, OrderedExecutor.TimedCallable<T>, OrderedExecutor.TimedRunnableenableBusyWait, enableThreadScopedMetrics, maxTasksInQueue, name, NO_TASK_LIMIT, preserveMdcForTaskExecution, rand, taskExecutionStats, taskPendingStats, threadIds, threads, traceTaskExecution, WARN_TIME_MICRO_SEC_DEFAULT, warnTimeMicroSec| Modifier and Type | Method and Description |
|---|---|
protected com.google.common.util.concurrent.ListeningScheduledExecutorService |
addExecutorDecorators(java.util.concurrent.ExecutorService executor) |
com.google.common.util.concurrent.ListeningScheduledExecutorService |
chooseThread() |
com.google.common.util.concurrent.ListeningScheduledExecutorService |
chooseThread(long orderingKey)
skip hashcode generation in this special case.
|
com.google.common.util.concurrent.ListeningScheduledExecutorService |
chooseThread(java.lang.Object orderingKey) |
protected java.util.concurrent.ExecutorService |
createSingleThreadExecutor(java.util.concurrent.ThreadFactory factory) |
protected com.google.common.util.concurrent.ListeningScheduledExecutorService |
getBoundedExecutor(java.util.concurrent.ExecutorService executor) |
static OrderedScheduler.SchedulerBuilder |
newSchedulerBuilder()
Create a builder to build ordered scheduler.
|
<V> java.util.concurrent.ScheduledFuture<V> |
schedule(java.util.concurrent.Callable<V> callable,
long delay,
java.util.concurrent.TimeUnit unit) |
java.util.concurrent.ScheduledFuture<?> |
schedule(java.lang.Runnable command,
long delay,
java.util.concurrent.TimeUnit unit) |
java.util.concurrent.ScheduledFuture<?> |
scheduleAtFixedRate(java.lang.Runnable command,
long initialDelay,
long period,
java.util.concurrent.TimeUnit unit) |
java.util.concurrent.ScheduledFuture<?> |
scheduleAtFixedRateOrdered(java.lang.Object orderingKey,
java.lang.Runnable command,
long initialDelay,
long period,
java.util.concurrent.TimeUnit unit)
Creates and executes a periodic action that becomes enabled first after
the given initial delay, and subsequently with the given period.
|
java.util.concurrent.ScheduledFuture<?> |
scheduleOrdered(java.lang.Object orderingKey,
java.lang.Runnable command,
long delay,
java.util.concurrent.TimeUnit unit)
Creates and executes a one-shot action that becomes enabled after the given delay.
|
java.util.concurrent.ScheduledFuture<?> |
scheduleWithFixedDelay(java.lang.Runnable command,
long initialDelay,
long delay,
java.util.concurrent.TimeUnit unit) |
java.util.concurrent.ScheduledFuture<?> |
scheduleWithFixedDelayOrdered(java.lang.Object orderingKey,
java.lang.Runnable command,
long initialDelay,
long delay,
java.util.concurrent.TimeUnit unit)
Creates and executes a periodic action that becomes enabled first after the given initial delay, and subsequently
with the given delay between the termination of one execution and the commencement of the next.
|
<T> com.google.common.util.concurrent.ListenableFuture<T> |
submitOrdered(java.lang.Object orderingKey,
java.util.concurrent.Callable<T> callable)
schedules a one time action to execute with an ordering guarantee on the key.
|
awaitTermination, chooseThreadIdx, execute, executeOrdered, executeOrdered, executeOrdered, forceShutdown, getThreadID, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, newBuilder, preserveMdc, shutdown, shutdownNow, submit, submit, submit, submitOrdered, timedCallable, timedCallables, timedRunnableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic static OrderedScheduler.SchedulerBuilder newSchedulerBuilder()
protected java.util.concurrent.ExecutorService createSingleThreadExecutor(java.util.concurrent.ThreadFactory factory)
createSingleThreadExecutor in class OrderedExecutorprotected com.google.common.util.concurrent.ListeningScheduledExecutorService getBoundedExecutor(java.util.concurrent.ExecutorService executor)
getBoundedExecutor in class OrderedExecutorprotected com.google.common.util.concurrent.ListeningScheduledExecutorService addExecutorDecorators(java.util.concurrent.ExecutorService executor)
addExecutorDecorators in class OrderedExecutorpublic com.google.common.util.concurrent.ListeningScheduledExecutorService chooseThread()
chooseThread in class OrderedExecutorpublic com.google.common.util.concurrent.ListeningScheduledExecutorService chooseThread(java.lang.Object orderingKey)
chooseThread in class OrderedExecutorpublic com.google.common.util.concurrent.ListeningScheduledExecutorService chooseThread(long orderingKey)
OrderedExecutorchooseThread in class OrderedExecutororderingKey - long ordering keypublic <T> com.google.common.util.concurrent.ListenableFuture<T> submitOrdered(java.lang.Object orderingKey,
java.util.concurrent.Callable<T> callable)
orderingKey - callable - public java.util.concurrent.ScheduledFuture<?> scheduleOrdered(java.lang.Object orderingKey,
java.lang.Runnable command,
long delay,
java.util.concurrent.TimeUnit unit)
orderingKey - - the key used for orderingcommand - - the Runnable to executedelay - - the time from now to delay executionunit - - the time unit of the delay parameterpublic java.util.concurrent.ScheduledFuture<?> scheduleAtFixedRateOrdered(java.lang.Object orderingKey,
java.lang.Runnable command,
long initialDelay,
long period,
java.util.concurrent.TimeUnit unit)
For more details check ScheduledExecutorService.scheduleAtFixedRate(Runnable, long, long, TimeUnit).
orderingKey - - the key used for orderingcommand - - the Runnable to executeinitialDelay - - the time to delay first executionperiod - - the period between successive executionsunit - - the time unit of the initialDelay and period parameterspublic java.util.concurrent.ScheduledFuture<?> scheduleWithFixedDelayOrdered(java.lang.Object orderingKey,
java.lang.Runnable command,
long initialDelay,
long delay,
java.util.concurrent.TimeUnit unit)
For more details check ScheduledExecutorService.scheduleWithFixedDelay(Runnable, long, long, TimeUnit)
.
orderingKey - - the key used for orderingcommand - - the Runnable to executeinitialDelay - - the time to delay first executiondelay - - the delay between the termination of one execution and the commencement of the nextunit - - the time unit of the initialDelay and delay parameterspublic java.util.concurrent.ScheduledFuture<?> schedule(java.lang.Runnable command,
long delay,
java.util.concurrent.TimeUnit unit)
schedule in interface java.util.concurrent.ScheduledExecutorServicepublic <V> java.util.concurrent.ScheduledFuture<V> schedule(java.util.concurrent.Callable<V> callable,
long delay,
java.util.concurrent.TimeUnit unit)
schedule in interface java.util.concurrent.ScheduledExecutorServicepublic java.util.concurrent.ScheduledFuture<?> scheduleAtFixedRate(java.lang.Runnable command,
long initialDelay,
long period,
java.util.concurrent.TimeUnit unit)
scheduleAtFixedRate in interface java.util.concurrent.ScheduledExecutorServicepublic java.util.concurrent.ScheduledFuture<?> scheduleWithFixedDelay(java.lang.Runnable command,
long initialDelay,
long delay,
java.util.concurrent.TimeUnit unit)
scheduleWithFixedDelay in interface java.util.concurrent.ScheduledExecutorServiceCopyright © 2011–2022 The Apache Software Foundation. All rights reserved.