new InProgressTx(entry.getValue().getVisibilityUpperBound(), newExpiration, TransactionType.LONG, entry.getValue().getCheckpointWritePointers()); entry.setValue(compatTx); } else if (entry.getValue().getType() == null) { InProgressTx compatTx = new InProgressTx(entry.getValue().getVisibilityUpperBound(), entry.getValue().getExpiration(), TransactionType.SHORT, entry.getValue().getCheckpointWritePointers()); entry.setValue(compatTx);
new InProgressTx(entry.getValue().getVisibilityUpperBound(), newExpiration, TransactionType.LONG, entry.getValue().getCheckpointWritePointers()); entry.setValue(compatTx); } else if (entry.getValue().getType() == null) { InProgressTx compatTx = new InProgressTx(entry.getValue().getVisibilityUpperBound(), entry.getValue().getExpiration(), TransactionType.SHORT, entry.getValue().getCheckpointWritePointers()); entry.setValue(compatTx);
private void addInProgressAndAdvance(long writePointer, long visibilityUpperBound, long expiration, TransactionType type) { inProgress.put(writePointer, new InProgressTx(visibilityUpperBound, expiration, type)); advanceWritePointer(writePointer); }
tLong, new TransactionManager.InProgressTx(readPtr, TransactionManager.getTxExpirationFromWritePointer( tLong, TxConstants.Manager.DEFAULT_TX_LONG_TIMEOUT), TransactionType.LONG), tShort, new TransactionManager.InProgressTx(readPtr, now + 1000, TransactionType.SHORT)));
long time1 = System.currentTimeMillis(); long wp1 = time1 * TxConstants.MAX_TX_PER_MS; inProgress.put(wp1, new TransactionManager.InProgressTx(wp1 - 5, -1L)); long time2 = time1 + 100; long wp2 = time2 * TxConstants.MAX_TX_PER_MS; inProgress.put(wp2, new TransactionManager.InProgressTx(wp2 - 50, time2 + 1000)); Map<Long, Set<ChangeId>> committing = Maps.newHashMap(); Map<Long, Set<ChangeId>> committed = Maps.newHashMap();
new TransactionManager.InProgressTx(startPointer - 1, currentTime + TimeUnit.DAYS.toSeconds(1), TransactionType.LONG)); } else { inProgress.put(startPointer + i, new TransactionManager.InProgressTx(startPointer - 1, currentTime + 300000L, TransactionType.SHORT));
tLong, new TransactionManager.InProgressTx(readPtr, TransactionManager.getTxExpirationFromWritePointer(tLong, TxConstants.Manager.DEFAULT_TX_LONG_TIMEOUT), TransactionType.LONG), tShort, new TransactionManager.InProgressTx(readPtr, now + 1000, TransactionType.SHORT)));
new TransactionManager.InProgressTx(visibilityUpperBound, expiration, txType, checkpointPointers));
new TransactionManager.InProgressTx(visibilityUpperBound, expiration, txType, checkpointPointers));
@Override protected NavigableMap<Long, TransactionManager.InProgressTx> decodeInProgress(BinaryDecoder decoder) throws IOException { int size = decoder.readInt(); NavigableMap<Long, TransactionManager.InProgressTx> inProgress = Maps.newTreeMap(); while (size != 0) { // zero denotes end of list as per AVRO spec for (int remaining = size; remaining > 0; --remaining) { long txId = decoder.readLong(); long expiration = decoder.readLong(); long visibilityUpperBound = decoder.readLong(); int txTypeIdx = decoder.readInt(); TransactionType txType; try { txType = TransactionType.values()[txTypeIdx]; } catch (ArrayIndexOutOfBoundsException e) { throw new IOException("Type enum ordinal value is out of range: " + txTypeIdx); } inProgress.put(txId, new TransactionManager.InProgressTx(visibilityUpperBound, expiration, txType, new LongArrayList())); } size = decoder.readInt(); } return inProgress; } }
@Override protected NavigableMap<Long, TransactionManager.InProgressTx> decodeInProgress(BinaryDecoder decoder) throws IOException { int size = decoder.readInt(); NavigableMap<Long, TransactionManager.InProgressTx> inProgress = Maps.newTreeMap(); while (size != 0) { // zero denotes end of list as per AVRO spec for (int remaining = size; remaining > 0; --remaining) { long txId = decoder.readLong(); long expiration = decoder.readLong(); long visibilityUpperBound = decoder.readLong(); int txTypeIdx = decoder.readInt(); TransactionType txType; try { txType = TransactionType.values()[txTypeIdx]; } catch (ArrayIndexOutOfBoundsException e) { throw new IOException("Type enum ordinal value is out of range: " + txTypeIdx); } inProgress.put(txId, new TransactionManager.InProgressTx(visibilityUpperBound, expiration, txType, new LongArrayList())); } size = decoder.readInt(); } return inProgress; } }
protected NavigableMap<Long, TransactionManager.InProgressTx> decodeInProgress(BinaryDecoder decoder) throws IOException { int size = decoder.readInt(); NavigableMap<Long, TransactionManager.InProgressTx> inProgress = Maps.newTreeMap(); while (size != 0) { // zero denotes end of list as per AVRO spec for (int remaining = size; remaining > 0; --remaining) { long txId = decoder.readLong(); long expiration = decoder.readLong(); long visibilityUpperBound = decoder.readLong(); inProgress.put(txId, new TransactionManager.InProgressTx(visibilityUpperBound, expiration)); } size = decoder.readInt(); } return inProgress; }
protected NavigableMap<Long, TransactionManager.InProgressTx> decodeInProgress(BinaryDecoder decoder) throws IOException { int size = decoder.readInt(); NavigableMap<Long, TransactionManager.InProgressTx> inProgress = Maps.newTreeMap(); while (size != 0) { // zero denotes end of list as per AVRO spec for (int remaining = size; remaining > 0; --remaining) { long txId = decoder.readLong(); long expiration = decoder.readLong(); long visibilityUpperBound = decoder.readLong(); inProgress.put(txId, new TransactionManager.InProgressTx(visibilityUpperBound, expiration)); } size = decoder.readInt(); } return inProgress; }
private void addInProgressAndAdvance(long writePointer, long visibilityUpperBound, long expiration, TransactionType type) { inProgress.put(writePointer, new InProgressTx(visibilityUpperBound, expiration, type)); advanceWritePointer(writePointer); }