All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.sirix.index.name.json.JsonNameIndexImpl Maven / Gradle / Ivy

Go to download

SirixDB is a hybrid on-disk and in-memory document oriented, versioned database system. It has a lightweight buffer manager, stores everything in a huge persistent and durable tree and allows efficient reconstruction of every revision. Furthermore, SirixDB implements change tracking, diffing and supports time travel queries.

There is a newer version: 0.11.0
Show newest version
package io.sirix.index.name.json;

import io.sirix.access.DatabaseType;
import io.sirix.index.IndexDef;
import io.sirix.api.PageTrx;
import io.sirix.index.name.NameIndexBuilderFactory;
import io.sirix.index.name.NameIndexListenerFactory;

public final class JsonNameIndexImpl implements JsonNameIndex {

  private final NameIndexBuilderFactory nameIndexBuilderFactory;

  private final NameIndexListenerFactory nameIndexListenerFactory;

  public JsonNameIndexImpl() {
    nameIndexBuilderFactory = new NameIndexBuilderFactory(DatabaseType.JSON);
    nameIndexListenerFactory = new NameIndexListenerFactory(DatabaseType.JSON);
  }

  @Override
  public JsonNameIndexBuilder createBuilder(final PageTrx pageWriteTrx,
      final IndexDef indexDef) {
    final var nameIndexBuilderDelegate = nameIndexBuilderFactory.create(pageWriteTrx, indexDef);
    return new JsonNameIndexBuilder(nameIndexBuilderDelegate);
  }

  @Override
  public JsonNameIndexListener createListener(final PageTrx pageWriteTrx,
      final IndexDef indexDef) {
    final var nameIndexListenerDelegate = nameIndexListenerFactory.create(pageWriteTrx, indexDef);
    return new JsonNameIndexListener(nameIndexListenerDelegate);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy