Top Inners Constructors Methods
reactor.core.scheduler

pack-priv final Class ThreadPerTaskBoundedElasticScheduler

extends Object
implements Scheduler, SchedulerState.DisposeAwaiter<ThreadPerTaskBoundedElasticScheduler.BoundedServices>, Scannable
Class Inheritance
All Implemented Interfaces
reactor.core.Scannable, reactor.core.scheduler.SchedulerState.DisposeAwaiter, reactor.core.scheduler.Scheduler, reactor.core.Disposable
Imports
java.util.concurrent.ThreadFactory, .TimeUnit, reactor.core.Disposable, .Scannable

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Constructor Summary

AccessConstructor and Description
pack-priv
ThreadPerTaskBoundedElasticScheduler(int maxThreads, int maxTaskQueuedPerThread, ThreadFactory factory)

Method Summary

Modifier and TypeMethod and Description
public boolean
public Scheduler.Worker
createWorker()

Implements reactor.core.scheduler.Scheduler.createWorker.

Creates a worker of this Scheduler.
public Object
scanUnsafe(Scannable.Attr<T>
a Attr to resolve for the component.
key
)

Implements reactor.core.Scannable.scanUnsafe.

This method is used internally by components to define their key-value mappings in a single place.
public Disposable
schedule(Runnable
the task to execute
task
)

Implements reactor.core.scheduler.Scheduler.schedule.

Schedules the non-delayed execution of the given task on this scheduler.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ThreadPerTaskBoundedElasticSchedulerback to summary
pack-priv ThreadPerTaskBoundedElasticScheduler(int maxThreads, int maxTaskQueuedPerThread, ThreadFactory factory)

Method Detail

awaitback to summary
public boolean await(ThreadPerTaskBoundedElasticScheduler.BoundedServices resource, long timeout, TimeUnit timeUnit) throws InterruptedException

Implements reactor.core.scheduler.SchedulerState.DisposeAwaiter.await.

Annotations
@Override
createWorkerback to summary
public Scheduler.Worker createWorker()

Implements reactor.core.scheduler.Scheduler.createWorker.

Doc from reactor.core.scheduler.Scheduler.createWorker.

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 ExecutorService).

Returns:Scheduler.Worker

the Worker instance.

Annotations
@Override
scanUnsafeback to summary
public Object scanUnsafe(Scannable.Attr<T> key)

Implements reactor.core.Scannable.scanUnsafe.

Doc from reactor.core.Scannable.scanUnsafe.

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 Attr key, implementors should take care to return values of the correct type, and return null if no specific value is available.

For public consumption of attributes, prefer using scan(Attr), which will return a typed value and fall back to the key's default if the component didn't define any mapping.

Parameters
key:Scannable.Attr<T>

a Attr to resolve for the component.

Returns:Object

the value associated to the key for that specific component, or null if none.

Annotations
@Override
scheduleback to summary
public Disposable schedule(Runnable task)

Implements reactor.core.scheduler.Scheduler.schedule.

Doc from reactor.core.scheduler.Scheduler.schedule.

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.

Parameters
task:Runnable

the task to execute

Returns:Disposable

the Disposable instance that let's one cancel this particular task. If the Scheduler has been shut down, throw a RejectedExecutionException.

Annotations
@Override
reactor.core.scheduler back to summary

pack-priv final Class ThreadPerTaskBoundedElasticScheduler.BoundedServices

extends Object
Class Inheritance
  • java.lang.Object
  • reactor.core.scheduler.ThreadPerTaskBoundedElasticScheduler.BoundedServices

Constructor Summary

AccessConstructor and Description
private
pack-priv

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

BoundedServicesback to summary
private BoundedServices()
BoundedServicesback to summary
pack-priv BoundedServices(ThreadPerTaskBoundedElasticScheduler parent)