return new TransactionSnapshot(snapshotTime, readPointer, writePointer, invalidCopy, inProgressCopy, committingCopy, committedCopy);
return new TransactionSnapshot(snapshotTime, readPointer, writePointer, invalidCopy, inProgressCopy, committingCopy, committedCopy);
@Override public TransactionVisibilityState decodeTransactionVisibilityState(InputStream in) { BinaryDecoder decoder = new BinaryDecoder(in); try { long timestamp = decoder.readLong(); long readPointer = decoder.readLong(); long writePointer = decoder.readLong(); Collection<Long> invalid = decodeInvalid(decoder); NavigableMap<Long, TransactionManager.InProgressTx> inProgress = decodeInProgress(decoder); return new TransactionSnapshot(timestamp, readPointer, writePointer, invalid, inProgress); } catch (IOException e) { LOG.error("Unable to deserialize transaction state: ", e); throw Throwables.propagate(e); } }
@Override public TransactionVisibilityState decodeTransactionVisibilityState(InputStream in) { BinaryDecoder decoder = new BinaryDecoder(in); try { long timestamp = decoder.readLong(); long readPointer = decoder.readLong(); long writePointer = decoder.readLong(); Collection<Long> invalid = decodeInvalid(decoder); NavigableMap<Long, TransactionManager.InProgressTx> inProgress = decodeInProgress(decoder); return new TransactionSnapshot(timestamp, readPointer, writePointer, invalid, inProgress); } catch (IOException e) { LOG.error("Unable to deserialize transaction state: ", e); throw Throwables.propagate(e); } }
@Override public TransactionSnapshot decode(InputStream in) { BinaryDecoder decoder = new BinaryDecoder(in); try { TransactionVisibilityState minTxSnapshot = decodeTransactionVisibilityState(in); NavigableMap<Long, Set<ChangeId>> committing = decodeChangeSets(decoder); NavigableMap<Long, Set<ChangeId>> committed = decodeChangeSets(decoder); return new TransactionSnapshot(minTxSnapshot.getTimestamp(), minTxSnapshot.getReadPointer(), minTxSnapshot.getWritePointer(), minTxSnapshot.getInvalid(), minTxSnapshot.getInProgress(), committing, committed); } catch (IOException e) { LOG.error("Unable to deserialize transaction state: ", e); throw Throwables.propagate(e); } }
@Override public TransactionSnapshot decode(InputStream in) { BinaryDecoder decoder = new BinaryDecoder(in); try { TransactionVisibilityState minTxSnapshot = decodeTransactionVisibilityState(in); NavigableMap<Long, Set<ChangeId>> committing = decodeChangeSets(decoder); NavigableMap<Long, Set<ChangeId>> committed = decodeChangeSets(decoder); return new TransactionSnapshot(minTxSnapshot.getTimestamp(), minTxSnapshot.getReadPointer(), minTxSnapshot.getWritePointer(), minTxSnapshot.getInvalid(), minTxSnapshot.getInProgress(), committing, committed); } catch (IOException e) { LOG.error("Unable to deserialize transaction state: ", e); throw Throwables.propagate(e); } }
return new TransactionSnapshot(System.currentTimeMillis(), readPointer, writePointer, invalid, inProgress, committing, committed);
tShort, new TransactionManager.InProgressTx(readPtr, now + 1000, TransactionType.SHORT))); TransactionSnapshot snapshot = new TransactionSnapshot(now, readPtr, nowWritePointer,
Map<Long, Set<ChangeId>> committing = Maps.newHashMap(); Map<Long, Set<ChangeId>> committed = Maps.newHashMap(); TransactionSnapshot snapshot = new TransactionSnapshot(now, 0, writePointer++, invalid, inprogress, committing, committed); TransactionEdit dummyEdit = TransactionEdit.createStarted(1, 0, Long.MAX_VALUE, TransactionType.SHORT); log.close(); snapshot = new TransactionSnapshot(now + 1, 0, writePointer++, invalid, inprogress, committing, committed); log.close(); snapshot = new TransactionSnapshot(now + 2, 0, writePointer++, invalid, inprogress, committing, committed); log.close(); snapshot = new TransactionSnapshot(now + 3, 0, writePointer++, invalid, inprogress, committing, committed); log.close(); snapshot = new TransactionSnapshot(now + 4, 0, writePointer++, invalid, inprogress, committing, committed); log.close(); snapshot = new TransactionSnapshot(now + 5, 0, writePointer++, invalid, inprogress, committing, committed);
Map<Long, Set<ChangeId>> committing = Maps.newHashMap(); Map<Long, Set<ChangeId>> committed = Maps.newHashMap(); TransactionSnapshot snapshot = new TransactionSnapshot(time2, 0, wp2, invalid, inProgress, committing, committed); long time3 = time1 + 200;
tShort, new TransactionManager.InProgressTx(readPtr, now + 1000, TransactionType.SHORT))); TransactionSnapshot snapshot = new TransactionSnapshot(now, readPtr, nowWritePointer,