package org.ehcache.xml.provider;
import org.ehcache.spi.service.ServiceCreationConfiguration;
import org.ehcache.xml.model.ConfigType;
import org.ehcache.xml.model.ThreadPoolReferenceType;
import java.util.function.BiConsumer;
import java.util.function.Function;
class ThreadPoolServiceCreationConfigurationParser<T extends ServiceCreationConfiguration<?>> extends SimpleCoreServiceCreationConfigurationParser<ThreadPoolReferenceType, T> {
ThreadPoolServiceCreationConfigurationParser(Class<T> configType,
Function<ConfigType, ThreadPoolReferenceType> getter, BiConsumer<ConfigType, ThreadPoolReferenceType> setter,
Function<String, T> parser, Function<T, String> unparser) {
super(configType, getter, setter, config -> parser.apply(config.getThreadPool()),
config -> new ThreadPoolReferenceType().withThreadPool(unparser.apply(config)));
}
}