@@ -157,25 +157,6 @@ public ScheduledDataLoaderRegistry register(String key, DataLoader<?, ?> dataLoa
157157 return this ;
158158 }
159159
160- /**
161- * Returns true if the dataloader has a predicate which returned true, OR the overall
162- * registry predicate returned true.
163- *
164- * @param dataLoaderKey the key in the dataloader map
165- * @param dataLoader the dataloader
166- *
167- * @return true if it should dispatch
168- */
169- private boolean shouldDispatch (String dataLoaderKey , DataLoader <?, ?> dataLoader ) {
170- DispatchPredicate dispatchPredicate = dataLoaderPredicates .get (dataLoader );
171- if (dispatchPredicate != null ) {
172- if (dispatchPredicate .test (dataLoaderKey , dataLoader )) {
173- return true ;
174- }
175- }
176- return this .dispatchPredicate .test (dataLoaderKey , dataLoader );
177- }
178-
179160 @ Override
180161 public void dispatchAll () {
181162 dispatchAllWithCount ();
@@ -222,6 +203,25 @@ public void rescheduleNow() {
222203 dataLoaders .forEach (this ::reschedule );
223204 }
224205
206+ /**
207+ * Returns true if the dataloader has a predicate which returned true, OR the overall
208+ * registry predicate returned true.
209+ *
210+ * @param dataLoaderKey the key in the dataloader map
211+ * @param dataLoader the dataloader
212+ *
213+ * @return true if it should dispatch
214+ */
215+ private boolean shouldDispatch (String dataLoaderKey , DataLoader <?, ?> dataLoader ) {
216+ DispatchPredicate dispatchPredicate = dataLoaderPredicates .get (dataLoader );
217+ if (dispatchPredicate != null ) {
218+ if (dispatchPredicate .test (dataLoaderKey , dataLoader )) {
219+ return true ;
220+ }
221+ }
222+ return this .dispatchPredicate .test (dataLoaderKey , dataLoader );
223+ }
224+
225225 private void reschedule (String key , DataLoader <?, ?> dataLoader ) {
226226 if (!closed ) {
227227 Runnable runThis = () -> dispatchOrReschedule (key , dataLoader );
0 commit comments