@ 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!