Mutable version of fast-select with persistence.
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)
}
});