Enum Class Threading

java.lang.Object
java.lang.Enum<Threading>
net.risingworld.api.events.Threading
All Implemented Interfaces:
Serializable, Comparable<Threading>, Constable

public enum Threading extends Enum<Threading>
Determines the call mode for events.
  • Enum Constant Details

    • Sync

      public static final Threading Sync
      Synchronizes event calls. This slows down the event calls, but makes them thread-safe.
    • Async

      public static final Threading Async
      Default behaviour, calls event directly (same thread, not synchronized). This is the fastest way to trigger events, but it is not thread-safe.
  • Method Details

    • values

      public static Threading[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Threading valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null