@Test public void startIdentifiedAtlasDbTransactionShouldFail() { StartIdentifiedAtlasDbTransactionResponse startIdentifiedAtlasDbTransactionResponse = makeResponse(1L); when(rawTimelockService.startIdentifiedAtlasDbTransactionBatch(1)) .thenReturn(ImmutableList.of(startIdentifiedAtlasDbTransactionResponse)); assertThrowsOnSecondCall(() -> timelockService.startIdentifiedAtlasDbTransactionBatch(1)); }
@Override public List<StartIdentifiedAtlasDbTransactionResponse> startIdentifiedAtlasDbTransactionBatch(int count) { return checkAndUpdateLowerBound(() -> delegate.startIdentifiedAtlasDbTransactionBatch(count), responses -> Collections.min(getTimestampsFromResponses(responses)), responses -> Collections.max(getTimestampsFromResponses(responses)), OperationType.TRANSACTION); }
TimestampCorroboratingTimelockService implements AutoDelegate_TimelockService { @Override public List<StartIdentifiedAtlasDbTransactionResponse> startIdentifiedAtlasDbTransactionBatch(int count) { return checkAndUpdateLowerBound(() -> delegate.startIdentifiedAtlasDbTransactionBatch(count), responses -> Collections.min(getTimestampsFromResponses(responses)), responses -> Collections.max(getTimestampsFromResponses(responses)), OperationType.TRANSACTION); } }
TimestampCorroboratingTimelockService implements AutoDelegate_TimelockService { @Override public List<StartIdentifiedAtlasDbTransactionResponse> startIdentifiedAtlasDbTransactionBatch(int count) { return checkAndUpdateLowerBound(() -> delegate.startIdentifiedAtlasDbTransactionBatch(count), responses -> Collections.min(getTimestampsFromResponses(responses)), responses -> Collections.max(getTimestampsFromResponses(responses)), OperationType.TRANSACTION); } private  TimestampCorroboratingTimelockService(TimelockService delegate); }
TimestampCorroboratingTimelockService implements AutoDelegate_TimelockService { @Override public List<StartIdentifiedAtlasDbTransactionResponse> startIdentifiedAtlasDbTransactionBatch(int count) { return checkAndUpdateLowerBound(() -> delegate.startIdentifiedAtlasDbTransactionBatch(count), responses -> Collections.min(getTimestampsFromResponses(responses)), responses -> Collections.max(getTimestampsFromResponses(responses)), OperationType.TRANSACTION); } private  TimestampCorroboratingTimelockService(TimelockService delegate); static TimelockService create(TimelockService delegate); @Override TimelockService delegate(); @Override long getFreshTimestamp(); @Override TimestampRange getFreshTimestamps(int numTimestampsRequested); @Override List<StartIdentifiedAtlasDbTransactionResponse> startIdentifiedAtlasDbTransactionBatch(int count); }
TimestampCorroboratingTimelockService implements AutoDelegate_TimelockService { @Override public List<StartIdentifiedAtlasDbTransactionResponse> startIdentifiedAtlasDbTransactionBatch(int count) { return checkAndUpdateLowerBound(() -> delegate.startIdentifiedAtlasDbTransactionBatch(count), responses -> Collections.min(getTimestampsFromResponses(responses)), responses -> Collections.max(getTimestampsFromResponses(responses)), OperationType.TRANSACTION); } private  TimestampCorroboratingTimelockService(TimelockService delegate); static TimelockService create(TimelockService delegate); @Override TimelockService delegate(); @Override long getFreshTimestamp(); @Override TimestampRange getFreshTimestamps(int numTimestampsRequested); @Override List<StartIdentifiedAtlasDbTransactionResponse> startIdentifiedAtlasDbTransactionBatch(int count);  }