@Test public void cannotCreateConfigWithBothLimitsNonPositive() { assertThatThrownBy(() -> CassandraCellLoadingConfig.of(-512, -333)) .isInstanceOf(IllegalStateException.class) .hasMessageContaining("should be positive"); assertThatThrownBy(() -> CassandraCellLoadingConfig.of(0, 0)) .isInstanceOf(IllegalStateException.class) .hasMessageContaining("should be positive"); }
static CassandraCellLoadingConfig of(int crossColumnLoadBatchLimit, int singleQueryLoadBatchLimit) { return ImmutableCassandraCellLoadingConfig.builder() .crossColumnLoadBatchLimit(crossColumnLoadBatchLimit) .singleQueryLoadBatchLimit(singleQueryLoadBatchLimit) .build(); }
CassandraCellLoadingConfig { static CassandraCellLoadingConfig of(int crossColumnLoadBatchLimit, int singleQueryLoadBatchLimit) { return ImmutableCassandraCellLoadingConfig.builder() .crossColumnLoadBatchLimit(crossColumnLoadBatchLimit) .singleQueryLoadBatchLimit(singleQueryLoadBatchLimit) .build(); } }
CassandraCellLoadingConfig { static CassandraCellLoadingConfig of(int crossColumnLoadBatchLimit, int singleQueryLoadBatchLimit) { return ImmutableCassandraCellLoadingConfig.builder() .crossColumnLoadBatchLimit(crossColumnLoadBatchLimit) .singleQueryLoadBatchLimit(singleQueryLoadBatchLimit) .build(); }  }
CassandraCellLoadingConfig { static CassandraCellLoadingConfig of(int crossColumnLoadBatchLimit, int singleQueryLoadBatchLimit) { return ImmutableCassandraCellLoadingConfig.builder() .crossColumnLoadBatchLimit(crossColumnLoadBatchLimit) .singleQueryLoadBatchLimit(singleQueryLoadBatchLimit) .build(); }  @Value.Default int crossColumnLoadBatchLimit(); @Value.Default int singleQueryLoadBatchLimit(); @Value.Check void check(); }
CassandraCellLoadingConfig { static CassandraCellLoadingConfig of(int crossColumnLoadBatchLimit, int singleQueryLoadBatchLimit) { return ImmutableCassandraCellLoadingConfig.builder() .crossColumnLoadBatchLimit(crossColumnLoadBatchLimit) .singleQueryLoadBatchLimit(singleQueryLoadBatchLimit) .build(); }  @Value.Default int crossColumnLoadBatchLimit(); @Value.Default int singleQueryLoadBatchLimit(); @Value.Check void check();  }