@Test public void testSetBucketMap() throws Exception { }
public void setBucketMap(String shardId, String bucketMapString) { boolean success = false; List<com.typesafe.config.ConfigObject> newShards = new ArrayList<>(); for (com.typesafe.config.Config shard : configImpl.getConfigList("gondola.shards")) { if (shard.getString("shardId").equals(shardId)) { shard = shard.withValue("bucketMap", ConfigValueFactory.fromAnyRef(bucketMapString)); success = true; } newShards.add(shard.root()); } if (!success) { throw new IllegalArgumentException("ShardID not found in config!" + shardId); } configImpl = configImpl.withValue("gondola.shards", ConfigValueFactory.fromIterable(newShards)); }
ConfigWriter { public void setBucketMap(String shardId, String bucketMapString) { boolean success = false; List<com.typesafe.config.ConfigObject> newShards = new ArrayList<>(); for (com.typesafe.config.Config shard : configImpl.getConfigList("gondola.shards")) { if (shard.getString("shardId").equals(shardId)) { shard = shard.withValue("bucketMap", ConfigValueFactory.fromAnyRef(bucketMapString)); success = true; } newShards.add(shard.root()); } if (!success) { throw new IllegalArgumentException("ShardID not found in config!" + shardId); } configImpl = configImpl.withValue("gondola.shards", ConfigValueFactory.fromIterable(newShards)); } }
ConfigWriter { public void setBucketMap(String shardId, String bucketMapString) { boolean success = false; List<com.typesafe.config.ConfigObject> newShards = new ArrayList<>(); for (com.typesafe.config.Config shard : configImpl.getConfigList("gondola.shards")) { if (shard.getString("shardId").equals(shardId)) { shard = shard.withValue("bucketMap", ConfigValueFactory.fromAnyRef(bucketMapString)); success = true; } newShards.add(shard.root()); } if (!success) { throw new IllegalArgumentException("ShardID not found in config!" + shardId); } configImpl = configImpl.withValue("gondola.shards", ConfigValueFactory.fromIterable(newShards)); } ConfigWriter(File configFile); }
ConfigWriter { public void setBucketMap(String shardId, String bucketMapString) { boolean success = false; List<com.typesafe.config.ConfigObject> newShards = new ArrayList<>(); for (com.typesafe.config.Config shard : configImpl.getConfigList("gondola.shards")) { if (shard.getString("shardId").equals(shardId)) { shard = shard.withValue("bucketMap", ConfigValueFactory.fromAnyRef(bucketMapString)); success = true; } newShards.add(shard.root()); } if (!success) { throw new IllegalArgumentException("ShardID not found in config!" + shardId); } configImpl = configImpl.withValue("gondola.shards", ConfigValueFactory.fromIterable(newShards)); } ConfigWriter(File configFile); File save(); void setBucketMap(String shardId, String bucketMapString); }
ConfigWriter { public void setBucketMap(String shardId, String bucketMapString) { boolean success = false; List<com.typesafe.config.ConfigObject> newShards = new ArrayList<>(); for (com.typesafe.config.Config shard : configImpl.getConfigList("gondola.shards")) { if (shard.getString("shardId").equals(shardId)) { shard = shard.withValue("bucketMap", ConfigValueFactory.fromAnyRef(bucketMapString)); success = true; } newShards.add(shard.root()); } if (!success) { throw new IllegalArgumentException("ShardID not found in config!" + shardId); } configImpl = configImpl.withValue("gondola.shards", ConfigValueFactory.fromIterable(newShards)); } ConfigWriter(File configFile); File save(); void setBucketMap(String shardId, String bucketMapString);  }