public class BackgroundThreadsRunner
extends java.lang.Object
com.mgnt.lifecycle.management.backgroundrunner
Constructor and Description |
---|
BackgroundThreadsRunner()
This constructor creates an instance of this class with default pool size which is the number of tasks submitted to this
BackgroundThreadsRunner.
|
BackgroundThreadsRunner(boolean isSelfInitializing)
This constructor is not really needed if this infrastructure is used within Spring.
|
BackgroundThreadsRunner(boolean isSelfInitializing,
int poolSize)
This constructor is not really needed if this infrastructure is used within Spring.
|
BackgroundThreadsRunner(int poolSize)
This constructor creates an instance of this class with predefined pool size rather then default one.
|
Modifier and Type | Method and Description |
---|---|
int |
getPoolSize() |
void |
setPoolSize(int poolSize)
This property defines the pool size of the thread pool that runs all the tasks.
|
public BackgroundThreadsRunner()
BackgroundThreadsRunner(int)
public BackgroundThreadsRunner(int poolSize)
poolSize
- pool size of the thread poolpublic BackgroundThreadsRunner(boolean isSelfInitializing)
BackgroundThreadsRunner()
or
BackgroundThreadsRunner(int)
provided that this class is defined as bean.
But this constructor had to be added for example provided in package
com.mgnt.lifecycle.management.backgroundrunner.example
. Since source code in this example does not
rely on Spring it has to initialize this class by itself using this constructor. However, if this infrastructure
is used in some other then Spring environment which has no way of initializing this class then this constructor
may be used. This constructor corresponds to BackgroundThreadsRunner()
isSelfInitializing
- public BackgroundThreadsRunner(boolean isSelfInitializing, int poolSize)
BackgroundThreadsRunner()
or
BackgroundThreadsRunner(int)
provided that this class is defined as bean.
But this constructor had to be added for example provided in package
com.mgnt.lifecycle.management.backgroundrunner.example
. Since source code in this example does not
rely on Spring it has to initialize this class by itself using this constructor. However, if this infrastructure
is used in some other then Spring environment which has no way of initializing this class then this constructor
may be used. This constructor corresponds to BackgroundThreadsRunner(int)
isSelfInitializing
- poolSize
- public int getPoolSize()
public void setPoolSize(int poolSize)
init()
is called. Otherwise it will
have no effect. Also calling constructor BackgroundThreadsRunner(int)
will have the
same effect: it will create an instance of this class with specified size rather then default onepoolSize
- pool size of the thread poolBackgroundThreadsRunner(int)