class SequencesStore extends GenericStoreImpl<Long> {

    public long next(Tx.Write tx, String name) {
        final Key key = Key.of(name);
        final Optional<Long> seqValue = ixMap.get(tx, key);
        if (seqValue.isPresent()) {
            final long nextValue = seqValue.get() + 1;
            ixMap.put(tx, key, nextValue);
            return nextValue;
        }
        ixMap.put(tx, key, 1L);
        return 1L;
    }

    @Autowired public  SequencesStore(Storage storage);

}