/** * Creates a new Transaction. This method only get called from start transaction, which is already * synchronized. */ private Transaction createTransaction(long writePointer, TransactionType type) { // For holding the first in progress short transaction Id (with timeout >= 0). long firstShortTx = Transaction.NO_TX_IN_PROGRESS; LongArrayList inProgressIds = new LongArrayList(inProgress.size()); for (Map.Entry<Long, InProgressTx> entry : inProgress.entrySet()) { long txId = entry.getKey(); inProgressIds.add(txId); // add any checkpointed write pointers to the in-progress list LongArrayList childIds = entry.getValue().getCheckpointWritePointers(); if (childIds != null) { for (int i = 0; i < childIds.size(); i++) { inProgressIds.add(childIds.get(i)); } } if (firstShortTx == Transaction.NO_TX_IN_PROGRESS && !entry.getValue().isLongRunning()) { firstShortTx = txId; } } return new Transaction(readPointer, writePointer, invalidArray, inProgressIds.toLongArray(), firstShortTx, type); }
/** * Creates a new Transaction. This method only get called from start transaction, which is already * synchronized. */ private Transaction createTransaction(long writePointer, TransactionType type) { // For holding the first in progress short transaction Id (with timeout >= 0). long firstShortTx = Transaction.NO_TX_IN_PROGRESS; LongArrayList inProgressIds = new LongArrayList(inProgress.size()); for (Map.Entry<Long, InProgressTx> entry : inProgress.entrySet()) { long txId = entry.getKey(); inProgressIds.add(txId); // add any checkpointed write pointers to the in-progress list LongArrayList childIds = entry.getValue().getCheckpointWritePointers(); if (childIds != null) { for (int i = 0; i < childIds.size(); i++) { inProgressIds.add(childIds.get(i)); } } if (firstShortTx == Transaction.NO_TX_IN_PROGRESS && !entry.getValue().isLongRunning()) { firstShortTx = txId; } } return new Transaction(readPointer, writePointer, invalidArray, inProgressIds.toLongArray(), firstShortTx, type); }
if (childWritePointers != null) { for (int i = 0; i < childWritePointers.size(); i++) { invalid.add(childWritePointers.get(i));
if (childWritePointers != null) { for (int i = 0; i < childWritePointers.size(); i++) { invalid.add(childWritePointers.get(i));
pl.lightUpdate(); nendpoints.add( nobs.writtenBits() ); long endpoint = endpoints.get( permutation[ i ] ); ibs.position( endpoint ); for( int col = 0; col < vectorSize; ++col ) {