@Test(expected = ConfigException.class) public void testConfigInvalidMap() { final Cast<SourceRecord> xform = new Cast.Key<>(); xform.configure(Collections.singletonMap(Cast.SPEC_CONFIG, "foo:int8:extra")); }
@Override public void configure(Map<String, ?> props) { final SimpleConfig config = new SimpleConfig(CONFIG_DEF, props); casts = parseFieldTypes(config.getList(SPEC_CONFIG)); wholeValueCastType = casts.get(WHOLE_VALUE_CAST); schemaUpdateCache = new SynchronizedCache<>(new LRUCache<Schema, Schema>(16)); }
Cast implements Transformation<R> { @Override public void configure(Map<String, ?> props) { final SimpleConfig config = new SimpleConfig(CONFIG_DEF, props); casts = parseFieldTypes(config.getList(SPEC_CONFIG)); wholeValueCastType = casts.get(WHOLE_VALUE_CAST); schemaUpdateCache = new SynchronizedCache<>(new LRUCache<Schema, Schema>(16)); } }
Cast implements Transformation<R> { @Override public void configure(Map<String, ?> props) { final SimpleConfig config = new SimpleConfig(CONFIG_DEF, props); casts = parseFieldTypes(config.getList(SPEC_CONFIG)); wholeValueCastType = casts.get(WHOLE_VALUE_CAST); schemaUpdateCache = new SynchronizedCache<>(new LRUCache<Schema, Schema>(16)); }  }
Cast implements Transformation<R> { @Override public void configure(Map<String, ?> props) { final SimpleConfig config = new SimpleConfig(CONFIG_DEF, props); casts = parseFieldTypes(config.getList(SPEC_CONFIG)); wholeValueCastType = casts.get(WHOLE_VALUE_CAST); schemaUpdateCache = new SynchronizedCache<>(new LRUCache<Schema, Schema>(16)); }  @Override void configure(Map<String, ?> props); @Override R apply(R record); @Override ConfigDef config(); @Override void close(); }
Cast implements Transformation<R> { @Override public void configure(Map<String, ?> props) { final SimpleConfig config = new SimpleConfig(CONFIG_DEF, props); casts = parseFieldTypes(config.getList(SPEC_CONFIG)); wholeValueCastType = casts.get(WHOLE_VALUE_CAST); schemaUpdateCache = new SynchronizedCache<>(new LRUCache<Schema, Schema>(16)); }  @Override void configure(Map<String, ?> props); @Override R apply(R record); @Override ConfigDef config(); @Override void close(); static final String OVERVIEW_DOC; static final String SPEC_CONFIG; static final ConfigDef CONFIG_DEF; }