Package org.glassfish.jersey.server
Class ServerExecutorProvidersConfigurator.DefaultBackgroundSchedulerProvider
- java.lang.Object
-
- org.glassfish.jersey.spi.AbstractThreadPoolProvider<java.util.concurrent.ScheduledThreadPoolExecutor>
-
- org.glassfish.jersey.spi.ScheduledThreadPoolExecutorProvider
-
- org.glassfish.jersey.server.ServerExecutorProvidersConfigurator.DefaultBackgroundSchedulerProvider
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,ExecutorServiceProvider
,ScheduledExecutorServiceProvider
- Enclosing class:
- ServerExecutorProvidersConfigurator
@BackgroundScheduler private static class ServerExecutorProvidersConfigurator.DefaultBackgroundSchedulerProvider extends ScheduledThreadPoolExecutorProvider
DefaultScheduledExecutorServiceProvider
used on the server side for providing the scheduled executor service that runs background tasks.
-
-
Field Summary
-
Fields inherited from class org.glassfish.jersey.spi.AbstractThreadPoolProvider
DEFAULT_TERMINATION_TIMEOUT
-
-
Constructor Summary
Constructors Constructor Description DefaultBackgroundSchedulerProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
getCorePoolSize()
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
-
-
-
-
Method Detail
-
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<java.util.concurrent.ScheduledThreadPoolExecutor>
- Returns:
- number of core threads in the provisioned thread pool executor.
- See Also:
AbstractThreadPoolProvider.createExecutor(int, java.util.concurrent.ThreadFactory, java.util.concurrent.RejectedExecutionHandler)
-
-