}
private static WritingConfig createWritingConfig(Config config) {
DatabaseWriterType databaseWriterType = config.get(DATABASE_WRITER_TYPE_SETTING);
FluentWritingConfig result = FluentWritingConfig.defaultConfiguration();
if (databaseWriterType != null) {
result = result.withWriterType(databaseWriterType);
}
if (config.get(WRITER_QUEUE_SIZE) != null) {
result = result.withQueueSize(config.get(WRITER_QUEUE_SIZE));
}
if (config.get(WRITER_BATCH_SIZE) != null) {
result = result.withBatchSize(config.get(WRITER_BATCH_SIZE));
}
return result;
}