Enum CloseReason

java.lang.Object
java.lang.Enum<CloseReason>
com.azure.messaging.eventhubs.models.CloseReason
All Implemented Interfaces:
Serializable, Comparable<CloseReason>, java.lang.constant.Constable

public enum CloseReason extends Enum<CloseReason>
Enumeration of all possible reasons a PartitionProcessor may be closed.
  • Enum Constant Details

    • LOST_PARTITION_OWNERSHIP

      public static final CloseReason LOST_PARTITION_OWNERSHIP
      If another event processor instance stole the ownership of a partition, this reason will be provided to PartitionProcessor.close(CloseContext).
    • EVENT_PROCESSOR_SHUTDOWN

      public static final CloseReason EVENT_PROCESSOR_SHUTDOWN
      If the event processor is shutting down by calling EventProcessorClient.stop(), the PartitionProcessor.close(CloseContext) will be called with this reason.
  • Method Details

    • values

      public static CloseReason[] 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 CloseReason 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