@Nonnull @MustBeLocked (ELockType.WRITE) private static MailQueuePerSMTP _getOrCreateMailQueuePerSMTP (@Nonnull final ISMTPSettings aSMTPSettings) { ValueEnforcer.notNull (aSMTPSettings, "SmtpSettings"); if (s_aSenderThreadPool.isShutdown ()) throw new IllegalStateException ("Cannot submit to mailqueues that are already stopped!"); // get queue per SMTP MailQueuePerSMTP aSMTPQueue = s_aQueueCache.get (aSMTPSettings); if (aSMTPQueue == null) { // create a new queue aSMTPQueue = new MailQueuePerSMTP (EmailGlobalSettings.getMaxMailQueueLength (), EmailGlobalSettings.getMaxMailSendCount (), aSMTPSettings, s_aFailedMailQueue); // put queue in cache s_aQueueCache.put (aSMTPSettings, aSMTPQueue); // and start running the queue s_aSenderThreadPool.submit (aSMTPQueue::collect); } return aSMTPQueue; }
aTable.createItemRow () .setLabel (EText.MSG_EMAIL_MAX_SEND_COUNT.getDisplayText (aDisplayLocale)) .setCtrl (Long.toString (EmailGlobalSettings.getMaxMailSendCount ())); aTable.createItemRow () .setLabel (EText.MSG_EMAIL_USE_SSL.getDisplayText (aDisplayLocale))
.setCtrl (Long.toString (EmailGlobalSettings.getMaxMailQueueLength ()))); aForm.addFormGroup (new BootstrapFormGroup ().setLabel (EText.MSG_EMAIL_MAX_SEND_COUNT.getDisplayText (aDisplayLocale)) .setCtrl (Long.toString (EmailGlobalSettings.getMaxMailSendCount ()))); aForm.addFormGroup (new BootstrapFormGroup ().setLabel (EText.MSG_EMAIL_USE_SSL.getDisplayText (aDisplayLocale)) .setCtrl (EPhotonCoreText.getYesOrNo (EmailGlobalSettings.isUseSSL (),
.setCtrl (Long.toString (EmailGlobalSettings.getMaxMailQueueLength ()))); aForm.addFormGroup (new BootstrapFormGroup ().setLabel (EText.MSG_EMAIL_MAX_SEND_COUNT.getDisplayText (aDisplayLocale)) .setCtrl (Long.toString (EmailGlobalSettings.getMaxMailSendCount ()))); aForm.addFormGroup (new BootstrapFormGroup ().setLabel (EText.MSG_EMAIL_USE_SSL.getDisplayText (aDisplayLocale)) .setCtrl (EPhotonCoreText.getYesOrNo (EmailGlobalSettings.isUseSSL (),