Package uk.ac.ebi.utils.threading
Class BatchService.BatchServiceTuner
java.lang.Object
uk.ac.ebi.utils.threading.PoolSizeTuner
uk.ac.ebi.utils.threading.BatchService.BatchServiceTuner
- Enclosing class:
BatchService<TK extends BatchServiceTask>
The custom
PoolSizeTuner that is used to optimise this service. You probably will never need to extend this,
if you need to change the tuner parameters, use the field BatchService.poolSizeTuner.
- date
- 8 Oct 2013
- Author:
- Marco Brandizi
-
Field Summary
Fields inherited from class uk.ac.ebi.utils.threading.PoolSizeTuner
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongintprotected voidsetThreadPoolSize(int size) This is invoked by the tuner to change the service's pool size.Methods inherited from class uk.ac.ebi.utils.threading.PoolSizeTuner
getMaxThreadIncr, getMaxThreads, getMinThreadIncr, getMinThreads, getPeriodMSecs, getThreadDeltaTolerance, isActive, setMaxThreadIncr, setMaxThreads, setMinThreadIncr, setMinThreads, setPeriodMSecs, setThreadDeltaTolerance, start, stop
-
Constructor Details
-
BatchServiceTuner
protected BatchServiceTuner()
-
-
Method Details
-
setThreadPoolSize
protected void setThreadPoolSize(int size) This is invoked by the tuner to change the service's pool size. This implementation does some synchronisation work and you're strongly advised to never override it, unless you're a masochist looking for deluxe treat...- Specified by:
setThreadPoolSizein classPoolSizeTuner
-
getThreadPoolSize
public int getThreadPoolSize()- Specified by:
getThreadPoolSizein classPoolSizeTuner
-
getCompletedTasks
public long getCompletedTasks()- Specified by:
getCompletedTasksin classPoolSizeTuner
-