@Test public void getsRangeAtBoundThresholdThrowsIfNoValueActuallyPresent() { assertThatThrownBy(() -> manager.getRangeAtBoundThreshold(ValueAndBound.of(Optional.empty(), TIMESTAMP_1))) .isInstanceOf(SafeIllegalStateException.class) .hasMessageContaining("Unexpectedly found no value in store"); }
@VisibleForTesting Map.Entry<Range<Long>, Integer> getRangeAtBoundThreshold(ValueAndBound<InternalSchemaMetadata> valueAndBound) { return valueAndBound.value() .orElseThrow(() -> new SafeIllegalStateException("Unexpectedly found no value in store")) .timestampToTransactionsTableSchemaVersion() .rangeMapView() .getEntry(valueAndBound.bound()); }
TransactionSchemaManager { @VisibleForTesting Map.Entry<Range<Long>, Integer> getRangeAtBoundThreshold(ValueAndBound<InternalSchemaMetadata> valueAndBound) { return valueAndBound.value() .orElseThrow(() -> new SafeIllegalStateException("Unexpectedly found no value in store")) .timestampToTransactionsTableSchemaVersion() .rangeMapView() .getEntry(valueAndBound.bound()); } }
TransactionSchemaManager { @VisibleForTesting Map.Entry<Range<Long>, Integer> getRangeAtBoundThreshold(ValueAndBound<InternalSchemaMetadata> valueAndBound) { return valueAndBound.value() .orElseThrow(() -> new SafeIllegalStateException("Unexpectedly found no value in store")) .timestampToTransactionsTableSchemaVersion() .rangeMapView() .getEntry(valueAndBound.bound()); } TransactionSchemaManager(CoordinationService<InternalSchemaMetadata> coordinationService); }
TransactionSchemaManager { @VisibleForTesting Map.Entry<Range<Long>, Integer> getRangeAtBoundThreshold(ValueAndBound<InternalSchemaMetadata> valueAndBound) { return valueAndBound.value() .orElseThrow(() -> new SafeIllegalStateException("Unexpectedly found no value in store")) .timestampToTransactionsTableSchemaVersion() .rangeMapView() .getEntry(valueAndBound.bound()); } TransactionSchemaManager(CoordinationService<InternalSchemaMetadata> coordinationService); int getTransactionsSchemaVersion(long timestamp); boolean tryInstallNewTransactionsSchemaVersion(int newVersion); }
TransactionSchemaManager { @VisibleForTesting Map.Entry<Range<Long>, Integer> getRangeAtBoundThreshold(ValueAndBound<InternalSchemaMetadata> valueAndBound) { return valueAndBound.value() .orElseThrow(() -> new SafeIllegalStateException("Unexpectedly found no value in store")) .timestampToTransactionsTableSchemaVersion() .rangeMapView() .getEntry(valueAndBound.bound()); } TransactionSchemaManager(CoordinationService<InternalSchemaMetadata> coordinationService); int getTransactionsSchemaVersion(long timestamp); boolean tryInstallNewTransactionsSchemaVersion(int newVersion);  }