Class OutboundSyncState.Builder
- java.lang.Object
-
- de.hybris.platform.outboundsync.job.impl.OutboundSyncState.Builder
-
- Enclosing class:
- OutboundSyncState
public static final class OutboundSyncState.Builder extends java.lang.ObjectA builder for creating immutableOutboundSyncState
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description OutboundSyncStatebuild()static OutboundSyncState.Builderfrom(@NotNull OutboundSyncState initialState)Creates a new instance of this builder by initializing its state to the provided outbound sync state.static OutboundSyncState.BuilderinitialOutboundSyncState()Creates initial outbound sync job state builder instance.OutboundSyncState.BuilderwithErrorCount(int errorCount)OutboundSyncState.BuilderwithStartTime(java.util.Date time)OutboundSyncState.BuilderwithSuccessCount(int successCount)OutboundSyncState.BuilderwithTotalItems(java.lang.Integer cnt)OutboundSyncState.BuilderwithUnprocessedCount(int unprocessedCount)
-
-
-
Method Detail
-
initialOutboundSyncState
public static OutboundSyncState.Builder initialOutboundSyncState()
Creates initial outbound sync job state builder instance.- Returns:
- new builder instance, which is initialized with the provided total number of items to be processed by the job and job start date, which is set to the current time.
-
from
public static OutboundSyncState.Builder from(@NotNull @NotNull OutboundSyncState initialState)
Creates a new instance of this builder by initializing its state to the provided outbound sync state. Modifiable attributes can be then changed in the builder, but those attributes that never change will be carried over into the states created by this this builder.- Parameters:
initialState- another state to initialize this builder to- Returns:
- a new builder instance initialized to the provided state
-
withTotalItems
public OutboundSyncState.Builder withTotalItems(java.lang.Integer cnt)
-
withSuccessCount
public OutboundSyncState.Builder withSuccessCount(int successCount)
-
withErrorCount
public OutboundSyncState.Builder withErrorCount(int errorCount)
-
withUnprocessedCount
public OutboundSyncState.Builder withUnprocessedCount(int unprocessedCount)
-
withStartTime
public OutboundSyncState.Builder withStartTime(java.util.Date time)
-
build
public OutboundSyncState build()
-
-