@Override public long getSize() { long tot = delegate.getSize(); final OTransactionIndexChanges indexChanges = database.getMicroOrRegularTransaction().getIndexChanges(delegate.getName()); if (indexChanges != null) { if (indexChanges.cleared) // BEGIN FROM 0 tot = 0; for (final Entry<Object, OTransactionIndexChangesPerKey> entry : indexChanges.changesPerKey.entrySet()) { for (final OTransactionIndexEntry e : entry.getValue().entries) { if (e.operation == OPERATION.REMOVE) { if (e.value == null) // KEY REMOVED tot--; } } } for (final OTransactionIndexEntry e : indexChanges.nullKeyChanges.entries) { if (e.operation == OPERATION.REMOVE) { if (e.value == null) // KEY REMOVED tot--; } } } return tot; }
@Override public Object getLastKey() { final OTransactionIndexChanges indexChanges = database.getMicroOrRegularTransaction().getIndexChanges(delegate.getName()); if (indexChanges == null) return delegate.getLastKey();
@Override public Object getFirstKey() { final OTransactionIndexChanges indexChanges = database.getMicroOrRegularTransaction().getIndexChanges(delegate.getName()); if (indexChanges == null) return delegate.getFirstKey();