@@ -157,25 +157,6 @@ public ScheduledDataLoaderRegistry register(String key, DataLoader<?, ?> dataLoa
157
157
return this ;
158
158
}
159
159
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
-
179
160
@ Override
180
161
public void dispatchAll () {
181
162
dispatchAllWithCount ();
@@ -222,6 +203,25 @@ public void rescheduleNow() {
222
203
dataLoaders .forEach (this ::reschedule );
223
204
}
224
205
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
+
225
225
private void reschedule (String key , DataLoader <?, ?> dataLoader ) {
226
226
if (!closed ) {
227
227
Runnable runThis = () -> dispatchOrReschedule (key , dataLoader );
0 commit comments