Class UnitItemIdGenerator

java.lang.Object
com.pnfsoftware.jeb.core.output.UnitItemIdGenerator

public class UnitItemIdGenerator extends Object
Generate unique item IDs for objects managed by units. Not thread-safe.

Ideally, units should generate item IDs. It is sometimes impractical. In those cases, they can use this generator to retrieve a unique ID associated to any object. (In short, this is akin to System.identityHashCode(Object), with the crucial difference that an id is unique to a given object, for as long as that object exists. Once an object is reclaimed by the GC, its ID may be reused.)

  • Field Details

    • expungeCount

      public long expungeCount
  • Constructor Details

    • UnitItemIdGenerator

      public UnitItemIdGenerator()
  • Method Details

    • generate

      public long generate(Object object)
    • retrieve

      public Object retrieve(long id)
    • size

      public int size()
    • realsize

      public int realsize()
    • nextIndex

      public int nextIndex()