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
      void execute​(java.lang.Runnable task)
      Executes the given command at some time in the future.
      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:
      java.util.concurrent.Future<?> submit​(java.lang.Runnable task)
      Submits a Runnable task for execution and returns a Future representing that task.
      static AppointmentExecutorService valueOf​(java.lang.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.
      • Methods inherited from class java.lang.Enum

        compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • 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​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • execute

        public void execute​(java.lang.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 the Executor implementation.
        Parameters:
        command - the runnable task
        Throws:
        java.util.concurrent.RejectedExecutionException - if this task cannot be accepted for execution
        java.lang.NullPointerException - if command is null
      • submit

        public java.util.concurrent.Future<?> submit​(java.lang.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:
        java.util.concurrent.RejectedExecutionException - if the task cannot be scheduled for execution
        java.lang.NullPointerException - 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: