Enum AppointmentExecutorService
- java.lang.Object
-
- java.lang.Enum<AppointmentExecutorService>
-
- fr.paris.lutece.plugins.appointment.service.AppointmentExecutorService
-
- All Implemented Interfaces:
Serializable,Comparable<AppointmentExecutorService>
public enum AppointmentExecutorService extends Enum<AppointmentExecutorService>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute(Runnable task)Executes the given command at some time in the future.voidshutdown()The following method shuts down the _executorService in two phases, first by calling shutdown to reject incoming tasks, and then calling shutdownNow, if necessary, to cancel any lingering tasks:Future<?>submit(Runnable task)Submits a Runnable task for execution and returns a Future representing that task.static AppointmentExecutorServicevalueOf(String name)Returns the enum constant of this type with the specified name.static AppointmentExecutorService[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final AppointmentExecutorService INSTANCE
-
-
Method Detail
-
values
public static AppointmentExecutorService[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AppointmentExecutorService c : AppointmentExecutorService.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AppointmentExecutorService valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
execute
public void execute(Runnable task)
Executes the given command at some time in the future. The command may execute in a new thread, in a pooled thread, or in the calling thread, at the discretion of theExecutorimplementation.- Parameters:
command- the runnable task- Throws:
RejectedExecutionException- if this task cannot be accepted for executionNullPointerException- if command is null
-
submit
public Future<?> submit(Runnable task)
Submits a Runnable task for execution and returns a Future representing that task. The Future's ge} method will return null upon successful completion.- Parameters:
task- the task to submit- Returns:
- a Future representing pending completion of the task
- Throws:
RejectedExecutionException- if the task cannot be scheduled for executionNullPointerException- if the task is null
-
shutdown
public void shutdown()
The following method shuts down the _executorService in two phases, first by calling shutdown to reject incoming tasks, and then calling shutdownNow, if necessary, to cancel any lingering tasks:
-
-