- All Implemented Interfaces:
Serializable
,Comparable<HubWorker.Mode>
- Enclosing class:
- HubWorker
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 Summary
Enum ConstantsEnum ConstantDescriptionLoop between nodes and balance storageLoop between nodes and at each node, move overflows to storage when possibleLoop between nodes, pick up overflows, and balance storageVisit a specific set of nodes and balance storageVisit a specific set of nodes and at each node, move overflows to storage when possibleVisit a specific set of nodes, pick up overflows, and balance storage -
Method Summary
Modifier and TypeMethodDescriptionstatic HubWorker.Mode
Returns the enum constant of this type with the specified name.static HubWorker.Mode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
LOOP
Loop between nodes and balance storage -
VISIT
Visit a specific set of nodes and balance storage -
LOOP_WITH_PICKUP
Loop between nodes, pick up overflows, and balance storage -
VISIT_WITH_PICKUP
Visit a specific set of nodes, pick up overflows, and balance storage -
LOOP_TO_FIX_OVERFLOWS
Loop between nodes and at each node, move overflows to storage when possible -
VISIT_TO_FIX_OVERFLOWS
Visit a specific set of nodes and at each node, move overflows to storage when possible
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-