Package com.commercetools.sync.states
Class StateSync
- java.lang.Object
 - 
- com.commercetools.sync.commons.BaseSync<io.sphere.sdk.states.StateDraft,io.sphere.sdk.states.State,StateSyncStatistics,StateSyncOptions>
 - 
- com.commercetools.sync.states.StateSync
 
 
 
- 
public class StateSync extends BaseSync<io.sphere.sdk.states.StateDraft,io.sphere.sdk.states.State,StateSyncStatistics,StateSyncOptions>
 
- 
- 
Field Summary
- 
Fields inherited from class com.commercetools.sync.commons.BaseSync
statistics, syncOptions 
 - 
 
- 
Constructor Summary
Constructors Constructor Description StateSync(StateSyncOptions stateSyncOptions) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.concurrent.CompletionStage<StateSyncStatistics>process(java.util.List<io.sphere.sdk.states.StateDraft> resourceDrafts)Given a list of resource (e.g.protected java.util.concurrent.CompletionStage<StateSyncStatistics>processBatch(java.util.List<io.sphere.sdk.states.StateDraft> batch)- 
Methods inherited from class com.commercetools.sync.commons.BaseSync
executeSupplierIfConcurrentModificationException, getStatistics, getSyncOptions, handleError, sync, syncBatches 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
StateSync
public StateSync(@Nonnull StateSyncOptions stateSyncOptions) 
 - 
 
- 
Method Detail
- 
process
protected java.util.concurrent.CompletionStage<StateSyncStatistics> process(@Nonnull java.util.List<io.sphere.sdk.states.StateDraft> resourceDrafts)
Description copied from class:BaseSyncGiven a list of resource (e.g. categories, products, etc..) drafts. This method compares each new resource in this list with it's corresponding old resource in a given CTP project, and in turn it either issues update actions on the existing resource if it exists or create it if it doesn't.- Specified by:
 processin classBaseSync<io.sphere.sdk.states.StateDraft,io.sphere.sdk.states.State,StateSyncStatistics,StateSyncOptions>- Parameters:
 resourceDrafts- the list of new resources as drafts.- Returns:
 - an instance of 
CompletionStage<U> which contains as a result an instance ofUwhich is a subclass ofBaseSyncStatisticsrepresenting thestatisticsinstance attribute ofthisBaseSync. 
 
- 
processBatch
protected java.util.concurrent.CompletionStage<StateSyncStatistics> processBatch(@Nonnull java.util.List<io.sphere.sdk.states.StateDraft> batch)
- Specified by:
 processBatchin classBaseSync<io.sphere.sdk.states.StateDraft,io.sphere.sdk.states.State,StateSyncStatistics,StateSyncOptions>
 
 - 
 
 -