Class OutboundSyncStateBuilder

java.lang.Object
de.hybris.platform.outboundsync.job.impl.OutboundSyncStateBuilder

public class OutboundSyncStateBuilder extends Object
A builder for creating immutable OutboundSyncState
  • Method Details

    • initialOutboundSyncState

      public static OutboundSyncStateBuilder 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 OutboundSyncStateBuilder 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 OutboundSyncStateBuilder withTotalItems(Integer cnt)
    • withSuccessCount

      public OutboundSyncStateBuilder withSuccessCount(int successCount)
    • withErrorCount

      public OutboundSyncStateBuilder withErrorCount(int errorCount)
    • withUnprocessedCount

      public OutboundSyncStateBuilder withUnprocessedCount(int unprocessedCount)
    • withStartTime

      public OutboundSyncStateBuilder withStartTime(Date time)
    • withStartTime

      public OutboundSyncStateBuilder withStartTime(Instant time)
    • withAborted

      public OutboundSyncStateBuilder withAborted(boolean aborted)
    • withSystemicError

      public OutboundSyncStateBuilder withSystemicError(boolean systemicError)
    • build

      public OutboundSyncState build()