Class EntryProcessorResult<V>


  • @PublicApi
    public class EntryProcessorResult<V>
    extends Object
    Result of entry processing operation.
    Since:
    5.6
    • Method Detail

      • getResult

        public V getResult()
      • getLastSuccessfulId

        public Long getLastSuccessfulId()
      • getFailedEntryId

        public Long getFailedEntryId()
      • success

        public static <V> EntryProcessorResult<V> success​(@Nullable V result)
        Create result after having successfully processed all entries.
        Type Parameters:
        V - result type
        Parameters:
        result - result
        Returns:
        result
      • partial

        public static <V> EntryProcessorResult<V> partial​(@Nullable V result,
                                                          long lastSuccessfulId)
        Create a result after having successfully processed some of the entries.

        This static factory method should be used when entry processor processed only some of the entries.

        Type Parameters:
        V - result type
        Parameters:
        result - result
        lastSuccessfulId - id of the last successfully processed JournalEntry
        Returns:
        result
      • failure

        public static <V> EntryProcessorResult<V> failure​(@Nullable V result,
                                                          long failedEntryId)
        Create a result after a processing failure.

        This static factory method should be used when an entry could not be processed. Processing should stop immediately after the first failure.

        Type Parameters:
        V - result type
        Parameters:
        result - result
        failedEntryId - id of JournalEntry which could not be processed
        Returns:
        result
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object