class XodusIxMap extends XodusIxBase<T> implements IxMap<T> {

    private void reindex() {
        this.env.executeInExclusiveTransaction(txn -> {
            indexes.forEach((name, idx) -> env.truncateStore(idx.getName(), txn));
            try (final Cursor ci = getMainDb().openCursor(txn)) {
                while (ci.getNext()) {
                    ByteIterable pk = ci.getKey();
                    final T value = getValue(new Key(pk), Bytes.toBytes(ci.getValue()));
                    indexFunctions.forEach((n, idxFun) -> {
                        final Store idx = getIdx(n);
                        idxFun.apply(value).forEach(ik -> idx.put(txn, ik.toByteIterable(), pk));
                    });
                }
            }
        });
    }

    public  XodusIxMap(final Xodus xodus,
                      final String name,
                      final Coder<T> coder,
                      final Map<String, Function<T, Set<Key>>> indexFunctions);

}