Class Topology.Location
- Enclosing class:
- Topology
A location is defined as a hierarchical list of labels separated by the "." character. The leftmost label is the top of the hierarchy, and each subsequent label represents a nested level. This hierarchy can be visualized as a tree structure with branches and parent/child relationships. For example, the locations "US.EAST.ZONE_A", "US.EAST.ZONE_B", "US.WEST.ZONE_A", and "EU.WEST.ZONE_B" can be represented in a tree structure as follows:
"" (root) ├── US │ ├── EAST │ │ ├── ZONE_A │ │ └── ZONE_B │ └── WEST │ └── ZONE_A └── EU └── WEST └── ZONE_BThe path from the root node to a label node defines the location branch level. In the tree above, the location branch levels are: "US", "EU", "US.EAST", "US.WEST", "US.WEST", "EU.WEST", "US.EAST.ZONE_A", "US.EAST.ZONE_B", "US.WEST.ZONE_A" and "EU.WEST.ZONE_B".
The location branch levels have parent/child relationships. For example:
- "" is the implicit parent location branch level of "US" and "EU" - "US" is the parent location branch level of "US.EAST" and "US.WEST" - "US.EAST" is the parent location branch level of "US.EAST.ZONE_A" and "US.EAST.ZONE_B"
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Location
Constructs a new Location. The location string is split by the "." character and each part is considered a level. For example, if the location string is "US.EAST.ZONE_A", the location branch levels would be: "US", "US.EAST" and "US.EAST.ZONE_A".- Parameters:
location
- the location string
-
-
Method Details
-
getLocationBranchLevelsFromLowestToHighest
public List<org.forgerock.opendj.server.leaderbasedreplication.Topology.LocationBranchLevel> getLocationBranchLevelsFromLowestToHighest()Returns the location branch levels of this location.The first element in the list is the lowest location branch level, and the last element is the highest location branch level. For example, if the location string is "US.EAST.ZONE_A", this method will return a list with the following elements: "US.EAST.ZONE_A", "US.EAST", "US". In this case, "US" is the parent location branch level of "US.EAST", and "US.EAST" is the parent location branch level of "US.EAST.ZONE_A".
- Returns:
- list of the location branch levels
-
toString
-
equals
-
hashCode
public int hashCode()
-