Enum ThreadModel

    • Enum Constant Detail

      • SHARED_THREAD_POOL

        public static final ThreadModel SHARED_THREAD_POOL
        A thread model that creates a thread pool to be shared by all services.
      • THREAD_PER_SERVICE

        public static final ThreadModel THREAD_PER_SERVICE
        A thread model that creates a thread for each Raft service.
    • Method Detail

      • values

        public static ThreadModel[] 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 (ThreadModel c : ThreadModel.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ThreadModel 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 name
        NullPointerException - if the argument is null
      • factory

        public abstract ThreadContextFactory factory​(String nameFormat,
                                                     int threadPoolSize,
                                                     org.slf4j.Logger logger)
        Returns a thread context factory.
        Parameters:
        nameFormat - the thread name format
        threadPoolSize - the thread pool size
        logger - the thread logger
        Returns:
        the thread context factory