Class IncrementalDeepTrieWriterPageAware<VALUE>

  • All Implemented Interfaces:
    java.lang.AutoCloseable, IncrementalTrieWriter<VALUE>

    @NotThreadSafe
    public class IncrementalDeepTrieWriterPageAware<VALUE>
    extends IncrementalTrieWriterPageAware<VALUE>
    This class is a variant of IncrementalTrieWriterPageAware which is able to build even very deep tries. While the parent class uses recursion for clarity, it may end up with stack overflow for tries with very long keys. This implementation can switch processing from stack to heap at a certain depth (provided as a constructor param).

    This class intentionally repeats code present in the parent class, both in the in-stack and on-heap versions of each of the three implemented recursive operations. Removing this repetition can cause higher stack usage and thus stack overflow failures.