@Test public void throwsIfCreatingWithNonCassandraKvs() { assertThatThrownBy(() -> CassandraTimestampStoreInvalidator.create(new InMemoryKeyValueService(false))) .isInstanceOf(IllegalArgumentException.class); }
public static CassandraTimestampStoreInvalidator create(KeyValueService keyValueService) { Preconditions.checkArgument(keyValueService instanceof CassandraKeyValueService, "CassandraTimestampStoreInvalidator should be instantiated with a CassandraKeyValueService!"); CassandraKeyValueService cassandraKeyValueService = (CassandraKeyValueService) keyValueService; return new CassandraTimestampStoreInvalidator(new CassandraTimestampBackupRunner(cassandraKeyValueService)); }
CassandraTimestampStoreInvalidator implements TimestampStoreInvalidator { public static CassandraTimestampStoreInvalidator create(KeyValueService keyValueService) { Preconditions.checkArgument(keyValueService instanceof CassandraKeyValueService, "CassandraTimestampStoreInvalidator should be instantiated with a CassandraKeyValueService!"); CassandraKeyValueService cassandraKeyValueService = (CassandraKeyValueService) keyValueService; return new CassandraTimestampStoreInvalidator(new CassandraTimestampBackupRunner(cassandraKeyValueService)); } }
CassandraTimestampStoreInvalidator implements TimestampStoreInvalidator { public static CassandraTimestampStoreInvalidator create(KeyValueService keyValueService) { Preconditions.checkArgument(keyValueService instanceof CassandraKeyValueService, "CassandraTimestampStoreInvalidator should be instantiated with a CassandraKeyValueService!"); CassandraKeyValueService cassandraKeyValueService = (CassandraKeyValueService) keyValueService; return new CassandraTimestampStoreInvalidator(new CassandraTimestampBackupRunner(cassandraKeyValueService)); } @VisibleForTesting  CassandraTimestampStoreInvalidator(CassandraTimestampBackupRunner backupRunner); }
CassandraTimestampStoreInvalidator implements TimestampStoreInvalidator { public static CassandraTimestampStoreInvalidator create(KeyValueService keyValueService) { Preconditions.checkArgument(keyValueService instanceof CassandraKeyValueService, "CassandraTimestampStoreInvalidator should be instantiated with a CassandraKeyValueService!"); CassandraKeyValueService cassandraKeyValueService = (CassandraKeyValueService) keyValueService; return new CassandraTimestampStoreInvalidator(new CassandraTimestampBackupRunner(cassandraKeyValueService)); } @VisibleForTesting  CassandraTimestampStoreInvalidator(CassandraTimestampBackupRunner backupRunner); static CassandraTimestampStoreInvalidator create(KeyValueService keyValueService); @Override @Idempotent long backupAndInvalidate(); @Override @Idempotent void revalidateFromBackup(); }
CassandraTimestampStoreInvalidator implements TimestampStoreInvalidator { public static CassandraTimestampStoreInvalidator create(KeyValueService keyValueService) { Preconditions.checkArgument(keyValueService instanceof CassandraKeyValueService, "CassandraTimestampStoreInvalidator should be instantiated with a CassandraKeyValueService!"); CassandraKeyValueService cassandraKeyValueService = (CassandraKeyValueService) keyValueService; return new CassandraTimestampStoreInvalidator(new CassandraTimestampBackupRunner(cassandraKeyValueService)); } @VisibleForTesting  CassandraTimestampStoreInvalidator(CassandraTimestampBackupRunner backupRunner); static CassandraTimestampStoreInvalidator create(KeyValueService keyValueService); @Override @Idempotent long backupAndInvalidate(); @Override @Idempotent void revalidateFromBackup();  }