io.sarl.sre.janus.services.executor
Class JreExecutorService
All Superinterfaces:
ExecutorService, org.arakhne.afc.services.IPreReleasableService, org.arakhne.afc.services.IService
@javax.inject.Singleton
class JreExecutorService
extends java.lang.Object
implements ExecutorService, org.arakhne.afc.services.IPreReleasableService
Service that executes the tasks asynchronously (in threads) with the JRE executor service.
Maven Group Identifier:
io.sarl.sre.janus
Maven Artifact Identifier:
janus.kernel
Property Summary
Modifier and type Property and description
ExecutorsConfig configuration
Replies the configuration.
java.util.concurrent.ExecutorService executorService
Replies the JRE service for scheduled tasks.
java.lang.Class<T> referenceType
java.util.concurrent.ScheduledExecutorService scheduledExecutorService
Replies the JRE service for scheduled tasks.
long taskCount
java.lang.Thread.UncaughtExceptionHandler uncaughtExceptionHandler
Replies the default exception handler.
Constructor Summary
Action Summary
Modifier and type Action and description
void applyBlockingConsumer([Logger],Iterable<T>,Consumer<T>)
java.util.concurrent.Future<V> executeAsap([Logger],Runnable)
java.util.concurrent.Future<V> executeAsap([Logger],Callable<V>)
java.util.concurrent.Future<V> executeAsap([Logger],T,Runnable)
int executeBlockingTask([Logger],int,int,Runnable)
void executeBlockingTasks([Logger],[boolean],Collection<E>)
void executeNotBlockingTask([Logger],int,int,Runnable)
ExecutorsConfig getConfiguration
Replies the configuration.
java.util.concurrent.ExecutorService getExecutorService
Replies the JRE service for scheduled tasks.
java.lang.Class<T> getReferenceType
java.util.concurrent.ScheduledExecutorService getScheduledExecutorService
Replies the JRE service for scheduled tasks.
long getTaskCount
java.lang.Thread.UncaughtExceptionHandler getUncaughtExceptionHandler
Replies the default exception handler.
void onPreStop
void onStart
void onStop
void purge
boolean remove(Runnable)
java.util.concurrent.ScheduledFuture<V> schedule([Logger],[long],[TimeUnit],Runnable)
java.util.concurrent.ScheduledFuture<V> schedule([Logger],[long],[TimeUnit],Callable<V>)
java.util.concurrent.ScheduledFuture<V> scheduleAtFixedRate([Logger],[long],[long],[TimeUnit],Runnable)
java.util.concurrent.ScheduledFuture<V> scheduleWithFixedDelay([Logger],[long],[long],[TimeUnit],Runnable)
final void setConfiguration(SreConfig)
Change the configuration from the general configuration.
void setConfiguration(ExecutorsConfig)
Change the configuration from the general configuration.
void setUncaughtExceptionHandler(UncaughtExceptionHandler)
Change the default exception handler.
void toJson(JsonBuffer)
java.lang.String toString
Replies the state of this service as a string.
Property Details
configuration
var configuration : ExecutorsConfig
Replies the configuration.

This property is an alias for the action: getConfiguration

Returns:
the configuration.
executorService
val executorService : java.util.concurrent.ExecutorService
Replies the JRE service for scheduled tasks.

This property is an alias for the action: getExecutorService

Returns:
the JRE service.
referenceType
val referenceType : java.lang.Class<T>

This property is an alias for the action: getReferenceType

scheduledExecutorService
val scheduledExecutorService : java.util.concurrent.ScheduledExecutorService
Replies the JRE service for scheduled tasks.

This property is an alias for the action: getScheduledExecutorService

Returns:
the JRE service.
taskCount
val taskCount : long

This property is an alias for the action: getTaskCount

uncaughtExceptionHandler
var uncaughtExceptionHandler : java.lang.Thread.UncaughtExceptionHandler
Replies the default exception handler.

This property is an alias for the action: getUncaughtExceptionHandler

Returns:
the default exception handler.
Constructor Details
new(ExecutorService,ScheduledExecutorService,UncaughtExceptionHandler,SreConfig)
new(ExecutorService,ScheduledExecutorService,UncaughtExceptionHandler,SreConfig)
Constructor.
Parameters:
standardService - the JRE service for executing not scheduled tasks.
scheduledService - the JRE service for executing scheduled tasks.
exceptionHandler - the default exception handler.
config - the configuration.
Action Details
applyBlockingConsumer([Logger],Iterable<T>,Consumer<T>)
def applyBlockingConsumer([Logger],Iterable<T>,Consumer<T>)

with T

executeAsap([Logger],Runnable)
def executeAsap([Logger],Runnable) : java.util.concurrent.Future<V>
executeAsap([Logger],Callable<V>)
def executeAsap([Logger],Callable<V>) : java.util.concurrent.Future<V>

with T

executeAsap([Logger],T,Runnable)
def executeAsap([Logger],T,Runnable) : java.util.concurrent.Future<V>

with T

executeBlockingTask([Logger],int,int,Runnable)
def executeBlockingTask([Logger],int,int,Runnable) : int
executeBlockingTasks([Logger],[boolean],Collection<E>)
def executeBlockingTasks([Logger],[boolean],Collection<E>)
executeNotBlockingTask([Logger],int,int,Runnable)
def executeNotBlockingTask([Logger],int,int,Runnable)
getConfiguration
def getConfiguration : ExecutorsConfig
Replies the configuration.
Returns:
the configuration.
getExecutorService
def getExecutorService : java.util.concurrent.ExecutorService
Replies the JRE service for scheduled tasks.
Returns:
the JRE service.
getReferenceType
def getReferenceType : java.lang.Class<T>
getScheduledExecutorService
def getScheduledExecutorService : java.util.concurrent.ScheduledExecutorService
Replies the JRE service for scheduled tasks.
Returns:
the JRE service.
getTaskCount
def getTaskCount : long
getUncaughtExceptionHandler
def getUncaughtExceptionHandler : java.lang.Thread.UncaughtExceptionHandler
Replies the default exception handler.
Returns:
the default exception handler.
onPreStop
def onPreStop
onStart
def onStart
onStop
def onStop
purge
def purge
remove(Runnable)
def remove(Runnable) : boolean
schedule([Logger],[long],[TimeUnit],Runnable)
def schedule([Logger],[long],[TimeUnit],Runnable) : java.util.concurrent.ScheduledFuture<V>
schedule([Logger],[long],[TimeUnit],Callable<V>)
def schedule([Logger],[long],[TimeUnit],Callable<V>) : java.util.concurrent.ScheduledFuture<V>

with T

scheduleAtFixedRate([Logger],[long],[long],[TimeUnit],Runnable)
def scheduleAtFixedRate([Logger],[long],[long],[TimeUnit],Runnable) : java.util.concurrent.ScheduledFuture<V>
scheduleWithFixedDelay([Logger],[long],[long],[TimeUnit],Runnable)
def scheduleWithFixedDelay([Logger],[long],[long],[TimeUnit],Runnable) : java.util.concurrent.ScheduledFuture<V>
setConfiguration(SreConfig)
def setConfiguration(SreConfig)
Change the configuration from the general configuration.
Parameters:
config - the configuration.
setConfiguration(ExecutorsConfig)
def setConfiguration(ExecutorsConfig)
Change the configuration from the general configuration.
Parameters:
config - the configuration.
setUncaughtExceptionHandler(UncaughtExceptionHandler)
def setUncaughtExceptionHandler(UncaughtExceptionHandler)
Change the default exception handler.
Parameters:
handler - the default exception handler.
toJson(JsonBuffer)
def toJson(JsonBuffer)
toString
def toString : java.lang.String
Replies the state of this service as a string.
Returns:
the string representation of the service's state.
Since:
0.12