| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final AtomicLong | |
| pack-priv final ThreadFactory | |
| pack-priv final int | |
| pack-priv int | |
| pack-priv static final ScheduledExecutorService[] | |
| pack-priv volatile SchedulerState | |
| private static final AtomicReferenceFieldUpdater | |
| pack-priv static final ScheduledExecutorService |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | await(ScheduledExecutorService[] resource, long timeout, TimeUnit timeUnit)
Implements reactor. |
| public Scheduler. | createWorker()
Implements reactor. |
| public void | dispose()
Overrides default reactor. |
| public Mono | disposeGracefully()
Overrides default reactor. dispose() that also allows for graceful cleanup
of underlying resources.
|
| public ScheduledExecutorService | get()
Implements java. ScheduledExecutorService for the ParallelScheduler
(Executors.newScheduledThreadPoolExecutor with core and max pool size of 1).
|
| public void | init()
Overrides default reactor. Workers.
|
| public Stream | inners()
Overrides default reactor. Stream of referenced inners (flatmap, multicast etc)
|
| public boolean | isDisposed()
Overrides default reactor. |
| pack-priv ScheduledExecutorService | |
| public Object | scanUnsafe(Scannable.
a keyAttr to resolve for the component.Implements reactor. |
| public Disposable | schedule(Runnable
the task to execute task)Implements reactor. |
| public Disposable | schedule(Runnable
the task to schedule task, long the delay amount, non-positive values indicate non-delayed scheduling delay, TimeUnit the unit of measure of the delay amount unit)Overrides default reactor. |
| public Disposable | schedulePeriodically(Runnable
the task to schedule task, long the initial delay amount, non-positive values indicate non-delayed scheduling initialDelay, long the period at which the task should be re-executed period, TimeUnit the unit of measure of the delay amount unit)Overrides default reactor. |
| public void | start()
Overrides default reactor. |
| public String |
| COUNTER | back to summary |
|---|---|
| pack-priv static final AtomicLong COUNTER | |
| factory | back to summary |
|---|---|
| pack-priv final ThreadFactory factory | |
| n | back to summary |
|---|---|
| pack-priv final int n | |
| roundRobin | back to summary |
|---|---|
| pack-priv int roundRobin | |
| SHUTDOWN | back to summary |
|---|---|
| pack-priv static final ScheduledExecutorService[] SHUTDOWN | |
| state | back to summary |
|---|---|
| pack-priv volatile SchedulerState<ScheduledExecutorService[]> state | |
| STATE | back to summary |
|---|---|
private static final AtomicReferenceFieldUpdater<ParallelScheduler, SchedulerState<T>> STATE
| |
| TERMINATED | back to summary |
|---|---|
| pack-priv static final ScheduledExecutorService TERMINATED | |
| ParallelScheduler | back to summary |
|---|---|
| pack-priv ParallelScheduler(int n, ThreadFactory factory) | |
| await | back to summary |
|---|---|
| public boolean await(ScheduledExecutorService[] resource, long timeout, TimeUnit timeUnit) throws InterruptedException Implements reactor.
| |
| createWorker | back to summary |
|---|---|
| public Scheduler. Implements reactor. Doc from reactor. Creates a worker of this Scheduler.
Once the Worker is no longer in use, one should call dispose() on it to
release any resources the particular Scheduler may have used.
It depends on the implementation, but Scheduler Workers should usually run tasks in
FIFO order. Some implementations may entirely delegate the scheduling to an
underlying structure (like an | |
| dispose | back to summary |
|---|---|
| public void dispose() Overrides default reactor. Doc from reactor. Instructs this Scheduler to release all resources and reject any new tasks to be executed. The operation is thread-safe. The Scheduler may choose to ignore this instruction. When used in combination with
| |
| disposeGracefully | back to summary |
|---|---|
| public Mono Overrides default reactor. Doc from reactor. Lazy variant of It is advised to apply a The returned | |
| get | back to summary |
|---|---|
| public ScheduledExecutorService get() Implements java. Instantiates the default
| |
| init | back to summary |
|---|---|
| public void init() Overrides default reactor. Doc from reactor. Instructs this Scheduler to prepare itself for running tasks
directly or through its Implementations are encouraged to throw an exception if this method is called
after the scheduler has been disposed via
| |
| inners | back to summary |
|---|---|
| public Stream Overrides default reactor. Doc from reactor. Return a | |
| isDisposed | back to summary |
|---|---|
| public boolean isDisposed() Overrides default reactor. Doc from reactor. Optionally return true when the resource or task is disposed. Implementations are not required to track disposition and as such may never return true even when disposed. However, they MUST only return true when there's a guarantee the resource or task is disposed.
| |
| pick | back to summary |
|---|---|
| pack-priv ScheduledExecutorService pick() | |
| scanUnsafe | back to summary |
|---|---|
| public Object scanUnsafe(Scannable. Implements reactor. Doc from reactor. This method is used internally by components to define their key-value mappings
in a single place. Although it is ignoring the generic type of the
For public consumption of attributes, prefer using | |
| schedule | back to summary |
|---|---|
| public Disposable schedule(Runnable task) Implements reactor. Doc from reactor. Schedules the non-delayed execution of the given task on this scheduler. This method is safe to be called from multiple threads but there are no ordering guarantees between tasks.
| |
| schedule | back to summary |
|---|---|
| public Disposable schedule(Runnable task, long delay, TimeUnit unit) Overrides default reactor. Doc from reactor. Schedules the execution of the given task with the given delay amount. This method is safe to be called from multiple threads but there are no ordering guarantees between tasks.
| |
| schedulePeriodically | back to summary |
|---|---|
| public Disposable schedulePeriodically(Runnable task, long initialDelay, long period, TimeUnit unit) Overrides default reactor. Doc from reactor. Schedules a periodic execution of the given task with the given initial delay and period. This method is safe to be called from multiple threads but there are no ordering guarantees between tasks. The periodic execution is at a fixed rate, that is, the first execution will be after the initial delay, the second after initialDelay + period, the third after initialDelay + 2 * period, and so on.
| |
| start | back to summary |
|---|---|
| public void start() Overrides default reactor. Doc from reactor. Instructs this Scheduler to prepare itself for running tasks directly or through its Workers. The operation is thread-safe but one should avoid using start() and dispose() concurrently as it would non-deterministically leave the Scheduler in either active or inactive state.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |