Class LiveFieldValues<S,​T>

  • All Implemented Interfaces:
    Closeable, AutoCloseable, ReferenceManager.RefreshListener

    public abstract class LiveFieldValues<S,​T>
    extends Object
    implements ReferenceManager.RefreshListener, Closeable
    Tracks live field values across NRT reader reopens. This holds a map for all updated ids since the last reader reopen. Once the NRT reader is reopened, it prunes the map. This means you must reopen your NRT reader periodically otherwise the RAM consumption of this class will grow unbounded!

    NOTE: you must ensure the same id is never updated at the same time by two threads, because in this case you cannot in general know which thread "won".

    • Constructor Detail

      • LiveFieldValues

        public LiveFieldValues​(ReferenceManager<S> mgr,
                               T missingValue)
        The missingValue must be non-null.