Class OutboundSyncStateBuilder
java.lang.Object
de.hybris.platform.outboundsync.job.impl.OutboundSyncStateBuilder
- Direct Known Subclasses:
OutboundSyncState.Builder
A builder for creating immutable
OutboundSyncState-
Method Summary
Modifier and TypeMethodDescriptionbuild()static OutboundSyncStateBuilderfrom(@NotNull OutboundSyncState initialState) Creates a new instance of this builder by initializing its state to the provided outbound sync state.static OutboundSyncStateBuilderCreates initial outbound sync job state builder instance.withAborted(boolean aborted) withErrorCount(int errorCount) withStartTime(Instant time) withStartTime(Date time) withSuccessCount(int successCount) withSystemicError(boolean systemicError) withTotalItems(Integer cnt) withUnprocessedCount(int unprocessedCount)
-
Method Details
-
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
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
-
withSuccessCount
-
withErrorCount
-
withUnprocessedCount
-
withStartTime
-
withStartTime
-
withAborted
-
withSystemicError
-
build
-