io.sirix.index.name.json.JsonNameIndexImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sirix-core Show documentation
Show all versions of sirix-core Show documentation
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.
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