Enum HubWorker.Mode

java.lang.Object
java.lang.Enum<HubWorker.Mode>
org.bzdev.bikeshare.HubWorker.Mode
All Implemented Interfaces:
Serializable, Comparable<HubWorker.Mode>
Enclosing class:
HubWorker

public static enum HubWorker.Mode extends Enum<HubWorker.Mode>
Enumeration listing the Worker modes. The class HubWorker uses this enumeration as an argument for the worker's method HubWorker.start(Mode,HubSorter,double,double), and essentially lists the operations that a worker can perform. Similarly, the HubBalancer class provides a method HubBalancer.getHubSorter(HubWorker.Mode,StorageHub,Hub[]) that will provide a hub sorter for the specified mode, given the storage hub used to get a worker and an array listing the hubs that the sorter should consider. The order in which hubs are visited and which hubs of that set are visited is a policy decision set by the hub balancer.
  • Enum Constant Details

    • LOOP

      public static final HubWorker.Mode LOOP
      Loop between nodes and balance storage
    • VISIT

      public static final HubWorker.Mode VISIT
      Visit a specific set of nodes and balance storage
    • LOOP_WITH_PICKUP

      public static final HubWorker.Mode LOOP_WITH_PICKUP
      Loop between nodes, pick up overflows, and balance storage
    • VISIT_WITH_PICKUP

      public static final HubWorker.Mode VISIT_WITH_PICKUP
      Visit a specific set of nodes, pick up overflows, and balance storage
    • LOOP_TO_FIX_OVERFLOWS

      public static final HubWorker.Mode LOOP_TO_FIX_OVERFLOWS
      Loop between nodes and at each node, move overflows to storage when possible
    • VISIT_TO_FIX_OVERFLOWS

      public static final HubWorker.Mode VISIT_TO_FIX_OVERFLOWS
      Visit a specific set of nodes and at each node, move overflows to storage when possible
  • Method Details

    • values

      public static HubWorker.Mode[] 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 HubWorker.Mode 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