Deprecate ContentBasedBlockingQueueRecordWriterBuilder
fmbenhassine opened this issue · 0 comments
fmbenhassine commented
The ContentBasedBlockingQueueRecordWriterBuilder
has no added value in regard to the configuration of ContentBasedBlockingQueueRecordWriter
. This:
ContentBasedBlockingQueueRecordWriter writer = ContentBasedBlockingQueueRecordWriterBuilder.newContentBasedBlockingQueueRecordWriterBuilder()
.when(new CsvFilePredicate()).writeTo(csvQueue)
.when(new XmlFilePredicate()).writeTo(xmlQueue)
.build();
has no real added value compared to:
Map<Predicate<Path>, BlockingQueue<Record<Path>>> queueMap = new HashMap<>();
queueMap.put(new CsvFilePredicate(), csvQueue);
queueMap.put(new XmlFilePredicate(), xmlQueue);
ContentBasedBlockingQueueRecordWriter<Path> writer = new ContentBasedBlockingQueueRecordWriter<>(queueMap);
other than more code to maintain on the framework side. This builder should be deprecated in v6.1 and removed in v6.2 or later.