Class SummaryBasedFlushContext

java.lang.Object
com.broadleafcommerce.sandbox.service.flush.SummaryBasedFlushContext
Direct Known Subclasses:
PromoteBatchFlushContext, RebaseBatchFlushContext

public class SummaryBasedFlushContext extends Object
Basic information pertaining to a batch queue of ChangeSummary state changes to persist.
  • Constructor Details

    • SummaryBasedFlushContext

      public SummaryBasedFlushContext(int batchSize, List<String> keys)
  • Method Details

    • isFull

      public boolean isFull()
      Whether or not the batch is full and ready to be flushed
      Returns:
      Whether or not the batch is full and ready to be flushed
    • isEmpty

      public boolean isEmpty()
      Whether or not the batch is empty
      Returns:
      Whether or not the batch is empty
    • clearUpdates

      public void clearUpdates()
      Clear all updates from the batch queue
    • clearPostExecutors

      public void clearPostExecutors()
      Clear all post executors from the batch queue
    • resetFlushId

      public void resetFlushId()
      Reset the flushId to a new identifier for the next batch
    • getBatchSize

      public int getBatchSize()
      The number of queue members to flush at once
    • getKeys

      public List<String> getKeys()
      The field name supported by this context. Relates to the information included in SummaryBasedFlushContext.SummaryUpdate.vals.
    • getSummaryUpdates

      public List<SummaryBasedFlushContext.SummaryUpdate> getSummaryUpdates()
      All the members in this queue that should be flushed
    • getFailed

      Any members that fail to flush - most likely based on failing SummaryBasedFlushContext.SummaryUpdate.whereState or SummaryBasedFlushContext.SummaryUpdate.whereStatuses conditions
    • getPostExecutors

      public List<SummaryBasedFlushContext.PostInformation> getPostExecutors()
      Represents all the notifications that should be sent for the updates
    • getFlushId

      public String getFlushId()
      An identifier for this particular flush batch
    • setFlushId

      public void setFlushId(String flushId)
      An identifier for this particular flush batch
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object