@Nonnull
  public static EChange setMailQueueSize (@Nonnegative final int nMaxMailQueueLen,
                                          @Nonnegative final int nMaxMailSendCount)
  {
    ValueEnforcer.isGT0 (nMaxMailQueueLen, "MaxMailQueueLen");
    ValueEnforcer.isGT0 (nMaxMailSendCount, "MaxMailSendCount");
    ValueEnforcer.isTrue (nMaxMailQueueLen >= nMaxMailSendCount,
                          () -> "MaxMailQueueLen (" +
                                nMaxMailQueueLen +
                                ") must be >= than MaxMailSendCount (" +
                                nMaxMailSendCount +
                                ")");

    return s_aRWLock.writeLocked ( () -> {
      if (nMaxMailQueueLen == s_nMaxMailQueueLen && nMaxMailSendCount == s_nMaxMailSendCount)
        return EChange.UNCHANGED;
      s_nMaxMailQueueLen = nMaxMailQueueLen;
      s_nMaxMailSendCount = nMaxMailSendCount;
      return EChange.CHANGED;
    });
  }
@ Nonnull public static EChange setMailQueueSize ( @ Nonnegative final int nMaxMailQueueLen , @ Nonnegative final int nMaxMailSendCount ) { ValueEnforcer . isGT0 ( nMaxMailQueueLen , "MaxMailQueueLen" ) ; ValueEnforcer . isGT0 ( nMaxMailSendCount , "MaxMailSendCount" ) ; ValueEnforcer . isTrue ( nMaxMailQueueLen >= nMaxMailSendCount , ( ) -> "MaxMailQueueLen (" + nMaxMailQueueLen + ") must be >= than MaxMailSendCount (" + nMaxMailSendCount + ")" ) ; return s_aRWLock . writeLocked ( ( ) -> { if ( nMaxMailQueueLen == s_nMaxMailQueueLen && nMaxMailSendCount == s_nMaxMailSendCount ) return EChange . UNCHANGED ; s_nMaxMailQueueLen = nMaxMailQueueLen ; s_nMaxMailSendCount = nMaxMailSendCount ; return EChange . CHANGED ; } ) ; }
Set mail queue settings. Changing these settings has no effect on existing
mail queues!

@param nMaxMailQueueLen
The maximum number of mails that can be queued. Must be &gt; 0.
@param nMaxMailSendCount
The maximum number of mails that are send out in one mail session.
Must be &gt; 0 but &le; than {@link #getMaxMailQueueLength()}.
@return {@link EChange}.