@Test public void startIdentifiedAtlasDbTransactionBatchShouldFail() { List<StartIdentifiedAtlasDbTransactionResponse> responses = ImmutableList.of(makeResponse(1L), makeResponse(2L), makeResponse(3L)); when(rawTimelockService.startIdentifiedAtlasDbTransactionBatch(3)).thenReturn(responses); assertThrowsOnSecondCall(() -> timelockService.startIdentifiedAtlasDbTransactionBatch(3)); }
@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);  }