/mutable-fast-select

Fast-select with sub ms querying and persistance

Primary LanguageJavaApache License 2.0Apache-2.0

mutable-fast-select

Build Status Coverage Status Maven Central

Mutable version of fast-select with persistence.

Usage

Add dependency:

<dependency>
  <groupId>com.github.terma</groupId>
  <artifactId>mutable-fast-select</artifactId>
  <version>0.0.6</version>
</dependency>

Create instance of mutable-fast-select

File dir = new File("???"); // path to dir where state will be stored
boolean useLogging = false;
MutableFastSelect<Data> m = new MutableFastSelect<>(Data.class, dir, useLogging);

Modify data, like simple update/insert:

Data data1 = ...;
Data data2 = ...;
m.modify(Updater.update(data1, data2));

Query:

mutableFastSelect.select(new Selector<Data> {
                                                        
  @Override
  public void execute(FastSelect<Data> data, Map<Object, List<Integer>> positions) {
    // some work on fast-select (data)
  }
  
});

Dependencies