T
- the generic typepublic class ThreadPoolQuery<T> extends Object
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
logger |
Constructor and Description |
---|
ThreadPoolQuery(javax.persistence.EntityManagerFactory entityMngFactory,
int fixedThreadPool)
Instantiates a new thread pool query.
|
Modifier and Type | Method and Description |
---|---|
ThreadWorker<T> |
createWorker(String query)
Adds the query worker.
|
void |
executeWorker(Runnable worker)
Execute worker.
|
ExecutorService |
getExecutor()
Gets the executor.
|
public ThreadPoolQuery(javax.persistence.EntityManagerFactory entityMngFactory, int fixedThreadPool)
entityMngFactory
- the entity mng factorypublic ThreadWorker<T> createWorker(String query) throws Exception
query
- the queryException
- the exceptionpublic void executeWorker(Runnable worker)
worker
- the workerpublic ExecutorService getExecutor()
Copyright © 2016. All Rights Reserved.