Class SerialNumberMap<T>

java.lang.Object
org.apache.hadoop.hdfs.server.namenode.SerialNumberMap<T>

@Private public class SerialNumberMap<T> extends Object
Map object to serial number.

It allows to get the serial number of an object, if the object doesn't exist in the map, a new serial number increased by 1 is generated to map to the object. The mapped object can also be got through the serial number.

The map is thread-safe.

  • Method Details

    • get

      public int get(T t)
    • get

      public T get(int i)
    • size

      public int size()
    • toString

      public String toString()
      Overrides:
      toString in class Object