static KsDef checkAndSetReplicationFactor(CassandraClient client, KsDef ksDef, CassandraKeyValueServiceConfig config) throws TException { KsDef result = ksDef; Set<String> datacenters; if (Objects.equals(result.getStrategy_class(), CassandraConstants.SIMPLE_STRATEGY)) { datacenters = getDcForSimpleStrategy(client, result, config); result = setNetworkStrategyIfCheckedTopology(result, config, datacenters); } else { datacenters = sanityCheckDatacenters(client, config); } sanityCheckReplicationFactor(result, config, datacenters); return result; }
@Override public String getStrategyClass() { return ks_def.getStrategy_class(); }
@Override public String getStrategyClass() { return ks_def.getStrategy_class(); }
static KsDef checkAndSetReplicationFactor(CassandraClient client, KsDef ksDef, CassandraKeyValueServiceConfig config) throws TException { KsDef result = ksDef; Set<String> datacenters; if (Objects.equals(result.getStrategy_class(), CassandraConstants.SIMPLE_STRATEGY)) { datacenters = getDcForSimpleStrategy(client, result, config); result = setNetworkStrategyIfCheckedTopology(result, config, datacenters); } else { datacenters = sanityCheckDatacenters(client, config); } sanityCheckReplicationFactor(result, config, datacenters); return result; }
public Object getFieldValue(_Fields field) { switch (field) { case NAME: return getName(); case STRATEGY_CLASS: return getStrategy_class(); case STRATEGY_OPTIONS: return getStrategy_options(); case REPLICATION_FACTOR: return Integer.valueOf(getReplication_factor()); case CF_DEFS: return getCf_defs(); case DURABLE_WRITES: return Boolean.valueOf(isDurable_writes()); } throw new IllegalStateException(); }
public Object getFieldValue(_Fields field) { switch (field) { case NAME: return getName(); case STRATEGY_CLASS: return getStrategy_class(); case STRATEGY_OPTIONS: return getStrategy_options(); case REPLICATION_FACTOR: return Integer.valueOf(getReplication_factor()); case CF_DEFS: return getCf_defs(); case DURABLE_WRITES: return Boolean.valueOf(isDurable_writes()); } throw new IllegalStateException(); }
public Object getFieldValue(_Fields field) { switch (field) { case NAME: return getName(); case STRATEGY_CLASS: return getStrategy_class(); case STRATEGY_OPTIONS: return getStrategy_options(); case REPLICATION_FACTOR: return Integer.valueOf(getReplication_factor()); case CF_DEFS: return getCf_defs(); case DURABLE_WRITES: return Boolean.valueOf(isDurable_writes()); } throw new IllegalStateException(); }
if (ksDef.getStrategy_class().contains(".NetworkTopologyStrategy"))