class TimestampConverter implements Transformation<R> {

    @Override
    public void configure(Map<String, ?> configs) {
        final SimpleConfig simpleConfig = new SimpleConfig(CONFIG_DEF, configs);
        final String field = simpleConfig.getString(FIELD_CONFIG);
        final String type = simpleConfig.getString(TARGET_TYPE_CONFIG);
        String formatPattern = simpleConfig.getString(FORMAT_CONFIG);
        schemaUpdateCache = new SynchronizedCache<>(new LRUCache<>(16));

        if (!VALID_TYPES.contains(type)) {
            throw new ConfigException("Unknown timestamp type in TimestampConverter: " + type + ". Valid values are "
                    + Utils.join(VALID_TYPES, ", ") + ".");
        }
        if (type.equals(TYPE_STRING) && formatPattern.trim().isEmpty()) {
            throw new ConfigException("TimestampConverter requires format option to be specified when using string timestamps");
        }
        SimpleDateFormat format = null;
        if (formatPattern != null && !formatPattern.trim().isEmpty()) {
            try {
                format = new SimpleDateFormat(formatPattern);
                format.setTimeZone(UTC);
            } catch (IllegalArgumentException e) {
                throw new ConfigException("TimestampConverter requires a SimpleDateFormat-compatible pattern for string timestamps: "
                        + formatPattern, e);
            }
        }
        config = new Config(field, type, format);
    }

}