Class PModeReceptionAwareness

java.lang.Object
com.helger.phase4.model.pmode.PModeReceptionAwareness
All Implemented Interfaces:
Serializable

@NotThreadSafe @MustImplementEqualsAndHashcode public class PModeReceptionAwareness extends Object implements Serializable
See Also:
  • Field Details

    • DEFAULT_RECEPTION_AWARENESS

      public static final boolean DEFAULT_RECEPTION_AWARENESS
      See Also:
    • DEFAULT_RETRY

      public static final boolean DEFAULT_RETRY
      See Also:
    • DEFAULT_MAX_RETRIES

      public static final int DEFAULT_MAX_RETRIES
      See Also:
    • DEFAULT_RETRY_INTERVAL_MS

      public static final long DEFAULT_RETRY_INTERVAL_MS
      See Also:
    • DEFAULT_DUPLICATE_DETECTION

      public static final boolean DEFAULT_DUPLICATE_DETECTION
      See Also:
  • Constructor Details

    • PModeReceptionAwareness

      public PModeReceptionAwareness(@Nonnull com.helger.commons.state.ETriState eReceptionAwareness, @Nonnull com.helger.commons.state.ETriState eRetry, int nMaxRetries, long nRetryIntervalMS, @Nonnull com.helger.commons.state.ETriState eDuplicateDetection)
  • Method Details

    • isReceptionAwarenessDefined

      public final boolean isReceptionAwarenessDefined()
      Returns:
      true if reception awareness is defined, false if it is undefined. If it is undefined, the default value (DEFAULT_RECEPTION_AWARENESS) will be used.
    • isReceptionAwareness

      public final boolean isReceptionAwareness()
      Returns:
      true if reception awareness is enabled, false of not.
    • setReceptionAwareness

      @Nonnull public final com.helger.commons.state.EChange setReceptionAwareness(boolean bReceptionAwareness)
      Set the reception awareness
      Parameters:
      bReceptionAwareness - true to enable it, false to disable it.
      Returns:
      EChange
    • setReceptionAwareness

      @Nonnull public final com.helger.commons.state.EChange setReceptionAwareness(@Nonnull com.helger.commons.state.ETriState eReceptionAwareness)
      Set the reception awareness
      Parameters:
      eReceptionAwareness - Value to use. May not be null.
      Returns:
      EChange
    • isRetryDefined

      public final boolean isRetryDefined()
      Returns:
      true if retry is defined, false if it is undefined. If it is undefined, the default value (DEFAULT_RETRY) will be used.
    • isRetry

      public final boolean isRetry()
      Returns:
      true if retry is enabled, false of not.
    • setRetry

      @Nonnull public final com.helger.commons.state.EChange setRetry(boolean bRetry)
      Set enable retry
      Parameters:
      bRetry - true to enable it, false to disable it.
      Returns:
      EChange
    • setRetry

      @Nonnull public final com.helger.commons.state.EChange setRetry(@Nonnull com.helger.commons.state.ETriState eRetry)
      Set enable retry
      Parameters:
      eRetry - Value to use. May not be null.
      Returns:
      EChange
    • getMaxRetries

      @Nonnegative public final int getMaxRetries()
      Returns:
      The maximum number of retries. Always ≥ 0.
    • setMaxRetries

      @Nonnull public final com.helger.commons.state.EChange setMaxRetries(@Nonnegative int nMaxRetries)
      Set the maximum number of retries. This value does not include the original try.
      Parameters:
      nMaxRetries - The maximum number of retries to use. Must be ≥ 0.
      Returns:
      EChange
    • getRetryIntervalMS

      @Nonnegative public final long getRetryIntervalMS()
      Returns:
      The milliseconds to wait between retries. Must be ≥ 0.
    • setRetryIntervalMS

      @Nonnull public final com.helger.commons.state.EChange setRetryIntervalMS(@Nonnegative long nRetryIntervalMS)
      Set the milliseconds to wait between retries. This should also be used to define the interval between the original try and the first retry.
      Parameters:
      nRetryIntervalMS - Milliseconds to wait. Must be ≥ 0.
      Returns:
      EChange
    • isDuplicateDetectionDefined

      public final boolean isDuplicateDetectionDefined()
      Returns:
      true if duplication detection is defined, false if it is undefined. If it is undefined, the default value (DEFAULT_DUPLICATE_DETECTION) will be used.
    • isDuplicateDetection

      public final boolean isDuplicateDetection()
      Returns:
      true if duplicate detection is enabled, false of not.
    • setDuplicateDetection

      @Nonnull public final com.helger.commons.state.EChange setDuplicateDetection(boolean bDuplicateDetection)
      Set duplicate detection
      Parameters:
      bDuplicateDetection - true to enable it, false to disable it.
      Returns:
      EChange
    • setDuplicateDetection

      @Nonnull public final com.helger.commons.state.EChange setDuplicateDetection(@Nonnull com.helger.commons.state.ETriState eDuplicateDetection)
      Set duplicate detection
      Parameters:
      eDuplicateDetection - Value to use. May not be null.
      Returns:
      EChange
    • equals

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

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

      public String toString()
      Overrides:
      toString in class Object
    • createDefault

      @Nonnull public static PModeReceptionAwareness createDefault()
      Returns:
      A new PModeReceptionAwareness using the default values.
      See Also: