committedChangeSets.headMap(TxUtils.getFirstShortInProgress(inProgress)).clear();
committedChangeSets.headMap(TxUtils.getFirstShortInProgress(inProgress)).clear();
/** * Creates a "dummy" transaction based on the given txVisibilityState's state. This is not a "real" transaction in * the sense that it has not been started, data should not be written with it, and it cannot be committed. However, * this can still be useful for filtering data according to the txVisibilityState's state. Instead of the actual * write pointer from the txVisibilityState, however, we use {@code Long.MAX_VALUE} to avoid mis-identifying any cells * as being written by this transaction (and therefore visible). */ public static Transaction createDummyTransaction(TransactionVisibilityState txVisibilityState) { return new Transaction(txVisibilityState.getReadPointer(), Long.MAX_VALUE, Longs.toArray(txVisibilityState.getInvalid()), Longs.toArray(txVisibilityState.getInProgress().keySet()), TxUtils.getFirstShortInProgress(txVisibilityState.getInProgress()), TransactionType.SHORT); }
/** * Creates a "dummy" transaction based on the given txVisibilityState's state. This is not a "real" transaction in * the sense that it has not been started, data should not be written with it, and it cannot be committed. However, * this can still be useful for filtering data according to the txVisibilityState's state. Instead of the actual * write pointer from the txVisibilityState, however, we use {@code Long.MAX_VALUE} to avoid mis-identifying any cells * as being written by this transaction (and therefore visible). */ public static Transaction createDummyTransaction(TransactionVisibilityState txVisibilityState) { return new Transaction(txVisibilityState.getReadPointer(), Long.MAX_VALUE, Longs.toArray(txVisibilityState.getInvalid()), Longs.toArray(txVisibilityState.getInProgress().keySet()), TxUtils.getFirstShortInProgress(txVisibilityState.getInProgress()), TransactionType.SHORT); }