java.lang.Object
java.lang.Enum<ProfileOrganizer.Slice>
net.i2p.router.peermanager.ProfileOrganizer.Slice
All Implemented Interfaces:
Serializable, Comparable<ProfileOrganizer.Slice>, java.lang.constant.Constable
Enclosing class:
ProfileOrganizer

public static enum ProfileOrganizer.Sliceextends Enum<ProfileOrganizer.Slice>
Defines peer selection slicing modes for tier-based peer organization.

Enumerates different strategies for dividing peers into subsets based on performance tiers and capacity requirements. Used to control which portions of the peer population are considered during selection operations.

Supports bit masking for combining multiple selection criteria and provides predefined constants for common slicing patterns including full selection, tier-based selection, and capacity-limited selection modes.

  • Enum Constant Details

  • Field Details

    • mask

      final int mask
      Selection mask.
    • val

      final int val
      Selection value.
  • Constructor Details

    • Slice

      private Slice(int mask, int val)
      Creates one masked slice.
      Parameters:
      mask - the bits to match
      val - the value those bits must have
  • Method Details

    • values

      public static ProfileOrganizer.Slice[] 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 ProfileOrganizer.Slice 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