public interface Executor
| Modifier and Type | Method and Description | 
|---|---|
void | 
cancelRequest(Long requestId)
Cancels active (queued, running or retrying) request 
 | 
void | 
destroy()
Destroys executor 
 | 
int | 
getInterval()  | 
int | 
getRetries()  | 
int | 
getThreadPoolSize()  | 
TimeUnit | 
getTimeunit()  | 
void | 
init()
Initialized executor 
 | 
Long | 
scheduleRequest(String commandName,
               CommandContext ctx)
Schedules execution of given command as soon as possible. 
 | 
Long | 
scheduleRequest(String commandName,
               Date date,
               CommandContext ctx)
Schedules execution of given command on defined time. 
 | 
void | 
setInterval(int waitTime)
Sets interval at which executor threads are running. 
 | 
void | 
setRetries(int defaultNroOfRetries)
Sets default number of retries that shall be attempted in case of an error. 
 | 
void | 
setThreadPoolSize(int nroOfThreads)
Sets default executor thread pool size. 
 | 
void | 
setTimeunit(TimeUnit timeunit)
Sets time unit for executor intervals 
 | 
void | 
updateRequestData(Long requestId,
                 Map<String,Object> data)
Updates request data by merging existing (if any) with given. 
 | 
Long scheduleRequest(String commandName, CommandContext ctx)
commandName - - FQCN of the commandctx - - contextual data given by executor serviceLong scheduleRequest(String commandName, Date date, CommandContext ctx)
commandName - - FQCN of the commanddate - - date at which given command shall be executedctx - - contextual data given by executor servicevoid cancelRequest(Long requestId)
requestId - - id of the request to cancelint getInterval()
void setInterval(int waitTime)
init method has been called.waitTime - int getRetries()
void setRetries(int defaultNroOfRetries)
init method has been called.defaultNroOfRetries - int getThreadPoolSize()
void setThreadPoolSize(int nroOfThreads)
init method has been called.nroOfThreads - TimeUnit getTimeunit()
void setTimeunit(TimeUnit timeunit)
timeunit - void init()
void destroy()
void updateRequestData(Long requestId, Map<String,Object> data)
requestId - unique id of the request to be updateddata - data to be set on the jobCopyright © 2001–2017 JBoss by Red Hat. All rights reserved.