File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
src/main/java/org/dataloader Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -368,11 +368,25 @@ public Builder registerAll(DataLoaderRegistry otherRegistry) {
368368 return this ;
369369 }
370370
371+ /**
372+ * The {@link DataLoaderInstrumentation} to use for this registry
373+ *
374+ * @param instrumentation instrumentation to use
375+ *
376+ * @return the builder for a fluent pattern
377+ */
371378 public Builder instrumentation (DataLoaderInstrumentation instrumentation ) {
372379 this .instrumentation = instrumentation ;
373380 return this ;
374381 }
375382
383+ /**
384+ * The {@link DispatchStrategy} to use for this registry
385+ *
386+ * @param dispatchStrategy strategy to use
387+ *
388+ * @return this builder for a fluent pattern
389+ */
376390 public Builder dispatchStrategy (DispatchStrategy dispatchStrategy ) {
377391 this .dispatchStrategy = dispatchStrategy ;
378392 return this ;
Original file line number Diff line number Diff line change 55
66import java .util .concurrent .atomic .AtomicBoolean ;
77
8+ /**
9+ * An interface to implement to allow for custom dispatch strategies when executing {@link DataLoader}s
10+ */
811@ NullMarked
912@ PublicApi
1013public interface DispatchStrategy {
1114
15+ /**
16+ * A {@link DispatchStrategy} that does nothing
17+ */
1218 DispatchStrategy NO_OP = new DispatchStrategy () {
1319 };
1420
21+ /**
22+ * Lifecycle method called when the registry is created that this dispatch strategy is attached to
23+ * @param registry the {@link DataLoaderRegistry} this dispatch strategy is attached to
24+ */
1525 default void onRegistryCreation (DataLoaderRegistry registry ) {
1626
1727 }
1828
29+ /**
30+ * Called when a {@link DataLoader#load(Object)} is called on a dataloader
31+ */
1932 default void loadCalled () {
2033
2134 }
2235
36+ /**
37+ * Called when a {@link DataLoader#load(Object)} is executed and completed on a dataloader
38+ */
2339 default void loadCompleted () {
2440
2541 }
You can’t perform that action at this time.
0 commit comments