Skip to content

Commit

Permalink
#325: Add generic Javadocs.
Browse files Browse the repository at this point in the history
  • Loading branch information
heshamMassoud committed Nov 24, 2018
1 parent 40395f6 commit c275a52
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/com/commercetools/sync/commons/BaseSync.java
Expand Up @@ -9,7 +9,14 @@
import java.util.function.Supplier;


/**
* @param <T> Resource Draft (e.g. {@link io.sphere.sdk.products.ProductDraft},
* {@link io.sphere.sdk.categories.CategoryDraft}, etc..
* @param <U> Subclass of {@link BaseSyncStatistics}
* @param <V> Subclass of {@link BaseSyncOptions}
*/
public abstract class BaseSync<T, U extends BaseSyncStatistics, V extends BaseSyncOptions> {

protected final U statistics;
protected final V syncOptions;

Expand Down Expand Up @@ -115,6 +122,7 @@ protected static <S> S executeSupplierIfConcurrentModificationException(
@Nonnull final Throwable sphereException,
@Nonnull final Supplier<S> onConcurrentModificationSupplier,
@Nonnull final Supplier<S> onOtherExceptionSupplier) {

final Throwable completionExceptionCause = sphereException.getCause();
if (completionExceptionCause instanceof ConcurrentModificationException) {
return onConcurrentModificationSupplier.get();
Expand Down
Expand Up @@ -15,6 +15,11 @@
import static com.commercetools.sync.commons.utils.CollectionUtils.emptyIfNull;
import static java.util.Optional.ofNullable;

/**
* @param <V> Resource Draft (e.g. {@link io.sphere.sdk.products.ProductDraft},
* {@link io.sphere.sdk.categories.CategoryDraft}, etc..
* @param <U> Resource (e.g. {@link io.sphere.sdk.products.Product}, {@link io.sphere.sdk.categories.Category}, etc..
*/
public class BaseSyncOptions<U, V> {
private final SphereClient ctpClient;
private final BiConsumer<String, Throwable> errorCallBack;
Expand Down

0 comments on commit c275a52

Please sign in to comment.