Class SymbolRegistry

java.lang.Object
com.quantfinlib.marketdata.SymbolRegistry

public final class SymbolRegistry extends Object
Interns instrument symbols to dense int ids so the hot path never touches String hashing or map lookups: resolve the id once at subscription time, then publish and dispatch with primitive ints only.
  • Constructor Details

    • SymbolRegistry

      public SymbolRegistry()
  • Method Details

    • register

      public int register(String symbol)
      Registers (or looks up) a symbol; returns its stable dense id.
    • id

      public int id(String symbol)
      Id of an already-registered symbol.
    • symbol

      public String symbol(int id)
    • size

      public int size()