Package org.glassfish.jersey.client
Class DefaultClientBackgroundSchedulerProvider
java.lang.Object
org.glassfish.jersey.spi.AbstractThreadPoolProvider<ScheduledThreadPoolExecutor>
org.glassfish.jersey.spi.ScheduledThreadPoolExecutorProvider
org.glassfish.jersey.client.DefaultClientBackgroundSchedulerProvider
- All Implemented Interfaces:
AutoCloseable
,ExecutorServiceProvider
,ScheduledExecutorServiceProvider
@ClientBackgroundScheduler
class DefaultClientBackgroundSchedulerProvider
extends ScheduledThreadPoolExecutorProvider
Default
ScheduledExecutorServiceProvider
used on the client side for providing the scheduled
executor service that runs background tasks.- Since:
- 2.26
-
Field Summary
Fields inherited from class org.glassfish.jersey.spi.AbstractThreadPoolProvider
DEFAULT_TERMINATION_TIMEOUT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected int
Get the number of the core threads of the the provisioned thread pool executor.Methods inherited from class org.glassfish.jersey.spi.ScheduledThreadPoolExecutorProvider
createExecutor, dispose, getExecutorService, preDestroy
Methods inherited from class org.glassfish.jersey.spi.AbstractThreadPoolProvider
close, getBackingThreadFactory, getExecutor, getRejectedExecutionHandler, getTerminationTimeout, isClosed, onClose
-
Constructor Details
-
DefaultClientBackgroundSchedulerProvider
DefaultClientBackgroundSchedulerProvider()Creates a new instance.
-
-
Method Details
-
getCorePoolSize
protected int getCorePoolSize()Description copied from class:AbstractThreadPoolProvider
Get the number of the core threads of the the provisioned thread pool executor.The value from this method is passed as one of the input parameters in a call to the
AbstractThreadPoolProvider.createExecutor(int, java.util.concurrent.ThreadFactory, java.util.concurrent.RejectedExecutionHandler)
method.The method can be overridden to customize the number of core threads of the provisioned thread pool executor. If not customized, the method defaults to the number of
available processors
in the system.- Overrides:
getCorePoolSize
in classAbstractThreadPoolProvider<ScheduledThreadPoolExecutor>
- Returns:
- number of core threads in the provisioned thread pool executor.
- See Also:
-