org.apache.hadoop.hdfs.server.blockmanagement

## Class HostSet

- java.lang.Object
- - org.apache.hadoop.hdfs.server.blockmanagement.HostSet

- All Implemented Interfaces:
    Iterable<InetSocketAddress>

      public class HostSet
      extends Object
      implements Iterable<InetSocketAddress>

  The HostSet allows efficient queries on matching wildcard addresses.

  For InetSocketAddress A and B with the same host address, we define a partial order between A and B, A <= B iff A.getPort() == B .getPort() || B.getPort() == 0.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `HostSet()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Iterator<InetSocketAddress>` | `iterator()`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

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

    - ### Methods inherited from interface java.lang.Iterable

      `forEach, spliterator`

- - ### Constructor Detail

    - #### HostSet

          public HostSet()

  - ### Method Detail

    - #### iterator

          public Iterator<InetSocketAddress> iterator()

      Specified by:
        `iterator` in interface `Iterable<InetSocketAddress>`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.