AbsoluteOrder (Apache Tomcat 10.1.57 API Documentation)
Description: declaration: package: org.apache.catalina.tribes.group, class: AbsoluteOrder

# Class AbsoluteOrder

java.lang.Object
org.apache.catalina.tribes.group.AbsoluteOrder

public class AbsoluteOrder extends Object

Title: Membership - Absolute Order

Description: A simple, yet agreeable and efficient way of ordering members

Ordering members can serve as a basis for electing a leader or coordinating efforts.
This is stinky simple, it works on the basis of the `Member` interface and orders members in the following format:

1. IP comparison - byte by byte, lower byte higher rank
2. IPv4 addresses rank higher than IPv6, ie the lesser number of bytes, the higher rank
3. Port comparison - lower port, higher rank
4. UniqueId comparison- byte by byte, lower byte higher rank

See Also:
  - `Member`

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `AbsoluteOrder.AbsoluteComparator`
  A comparator for absolute ordering of members.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final AbsoluteOrder.AbsoluteComparator`
  `comp`
  The comparator for absolute order.

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `AbsoluteOrder()`
  Protected constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static void`
  `absoluteOrder(List<Member> members)`
  Sort the members in absolute order.
  `static void`
  `absoluteOrder(Member[] members)`
  Sort the members in absolute order.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### comp

    public static final AbsoluteOrder.AbsoluteComparator comp
    The comparator for absolute order.

- ## Constructor Details

  - ### AbsoluteOrder

    protected AbsoluteOrder()
    Protected constructor.

- ## Method Details

  - ### absoluteOrder

    public static void absoluteOrder(Member[] members)
    Sort the members in absolute order.
    Parameters:
      `members` - The members to sort

  - ### absoluteOrder

    public static void absoluteOrder(List<Member> members)
    Sort the members in absolute order.
    Parameters:
      `members` - The members to sort