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()
Returns configured interval at which executor threads are running
|
int |
getRetries()
Returns configured default number of retries that shall be attempted in case of an error
|
int |
getThreadPoolSize()
Returns configured executor thread pool size
|
TimeUnit |
getTimeunit()
Returns time unit configured for executor intervals
|
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
|
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()
Copyright © 2001–2015 JBoss by Red Hat. All rights reserved.