dataLock.unlockWrite(key);
}
@Override
public CloseableIterator<Long> keyIterator() {
final JniKeyDBIterator iterator = ((JniDB) db).keyIterator(new ReadOptions());
iterator.seekToFirst();
return new CloseableIterator<Long>() {
@Override
public boolean hasNext() {
return iterator.hasNext();
}
@Override
public Long next() {
byte[] entry = iterator.next();
return SerializationUtils.bytesToLong(entry);
}
@Override
public void remove() {
throw new RuntimeException("Not implemented");
}
@Override
public void closeInt() {
iterator.close();
}
};
}