Enum QueueFactory.QueuePreset

java.lang.Object
java.lang.Enum<QueueFactory.QueuePreset>
io.github.elimelt.pmqueue.QueueFactory.QueuePreset
All Implemented Interfaces:
Serializable, Comparable<QueueFactory.QueuePreset>, java.lang.constant.Constable
Enclosing class:
QueueFactory

public static enum QueueFactory.QueuePreset extends Enum<QueueFactory.QueuePreset>
Predefined queue configurations
  • Enum Constant Details

    • HIGH_THROUGHPUT

      public static final QueueFactory.QueuePreset HIGH_THROUGHPUT
      Configures the queue with high throughput settings.
    • DURABLE

      public static final QueueFactory.QueuePreset DURABLE
      Configures the queue with durability settings.
    • LOW_MEMORY

      public static final QueueFactory.QueuePreset LOW_MEMORY
      Configures the queue with large message settings.
  • Method Details

    • values

      public static QueueFactory.QueuePreset[] 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 QueueFactory.QueuePreset 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
    • createQueue

      public MessageQueue createQueue(String filePath) throws IOException
      Creates a new MessageQueue instance with the specified configuration.
      Parameters:
      filePath - the file path for the queue
      Returns:
      MessageQueue instance
      Throws:
      IOException - if an I/O error occurs