Enum GameThreadPolicy

java.lang.Object
java.lang.Enum<GameThreadPolicy>
privbot.context.GameThreadPolicy
All Implemented Interfaces:
Serializable, Comparable<GameThreadPolicy>, java.lang.constant.Constable

public enum GameThreadPolicy extends Enum<GameThreadPolicy>
How GameThread gets a read onto a thread that may touch the client.

AUTO derives the route from what GameThread knows about the client's threads. The other values fix the route (GameThread.pinPolicy(privbot.context.GameThreadPolicy)). PrivBot chooses the policy; a plugin leaves it alone.

  • Enum Constant Details

    • AUTO

      public static final GameThreadPolicy AUTO
      Derive the route from what is known about the client's threads.
    • EDT_MARSHAL

      public static final GameThreadPolicy EDT_MARSHAL
      Inline on the client thread, the game thread and the EDT; anything else marshals onto the EDT.
    • PULSE_QUEUE

      public static final GameThreadPolicy PULSE_QUEUE
      Inline on the client thread, the game thread and the EDT; anything else waits on a queue drained once per frame.
    • CLIENT_THREAD

      public static final GameThreadPolicy CLIENT_THREAD
      Inline on the client thread only; anything else waits on the ClientThread queue.
  • Method Details

    • values

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

      public static GameThreadPolicy 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