Skip to content

Commit 170ccf8

Browse files
committed
reorged method placement
1 parent 6523015 commit 170ccf8

File tree

1 file changed

+18
-19
lines changed

1 file changed

+18
-19
lines changed

src/main/java/org/dataloader/DataLoaderHelper.java

+18-19
Original file line numberDiff line numberDiff line change
@@ -533,25 +533,6 @@ private CompletableFuture<List<V>> invokeBatchPublisher(List<K> keys, List<Objec
533533
return loadResult;
534534
}
535535

536-
private ReactiveSupport.HelperIntegration<K> helperIntegration() {
537-
return new ReactiveSupport.HelperIntegration<>() {
538-
@Override
539-
public StatisticsCollector getStats() {
540-
return stats;
541-
}
542-
543-
@Override
544-
public void clearCacheView(K key) {
545-
dataLoader.clear(key);
546-
}
547-
548-
@Override
549-
public void clearCacheEntriesOnExceptions(List<K> keys) {
550-
possiblyClearCacheEntriesOnExceptions(keys);
551-
}
552-
};
553-
}
554-
555536
private CompletableFuture<List<V>> invokeMappedBatchPublisher(List<K> keys, List<Object> keyContexts, List<CompletableFuture<V>> queuedFutures, BatchLoaderEnvironment environment) {
556537
CompletableFuture<List<V>> loadResult = new CompletableFuture<>();
557538
Subscriber<Map.Entry<K, V>> subscriber = ReactiveSupport.mappedBatchSubscriber(loadResult, keys, keyContexts, queuedFutures, helperIntegration());
@@ -642,4 +623,22 @@ private static <T> DispatchResult<T> emptyDispatchResult() {
642623
return (DispatchResult<T>) EMPTY_DISPATCH_RESULT;
643624
}
644625

626+
private ReactiveSupport.HelperIntegration<K> helperIntegration() {
627+
return new ReactiveSupport.HelperIntegration<>() {
628+
@Override
629+
public StatisticsCollector getStats() {
630+
return stats;
631+
}
632+
633+
@Override
634+
public void clearCacheView(K key) {
635+
dataLoader.clear(key);
636+
}
637+
638+
@Override
639+
public void clearCacheEntriesOnExceptions(List<K> keys) {
640+
possiblyClearCacheEntriesOnExceptions(keys);
641+
}
642+
};
643+
}
645644
}

0 commit comments

Comments
 (0)