◆ MailQueueConsumer()
org.turro.mail.pool.MailQueueConsumer.MailQueueConsumer |
( |
| ) |
|
◆ addToQueue() [1/4]
void org.turro.mail.pool.MailQueueConsumer.addToQueue |
( |
Collection< MailMessage > |
pool | ) |
|
◆ addToQueue() [2/4]
void org.turro.mail.pool.MailQueueConsumer.addToQueue |
( |
Collection< MailMessage > |
pool, |
|
|
Consumer |
onFinish |
|
) |
| |
Definition at line 43 of file MailQueueConsumer.java.
44 if(pool ==
null)
return;
45 int index = 0,
size = pool.size();
46 for(MailMessage mail : pool) {
◆ addToQueue() [3/4]
void org.turro.mail.pool.MailQueueConsumer.addToQueue |
( |
MailMessage |
mail | ) |
|
◆ addToQueue() [4/4]
void org.turro.mail.pool.MailQueueConsumer.addToQueue |
( |
MailMessage |
mail, |
|
|
Consumer |
onFinish |
|
) |
| |
Definition at line 59 of file MailQueueConsumer.java.
61 if(!QUEUE.offer(
new MailQueueItem(mail, onFinish), 60L, TimeUnit.MINUTES)) {
62 WebLoggers.warning(
this).message(
"Too long attempt").log();
64 }
catch (InterruptedException ex) {
65 WebLoggers.severe(
this).exception(ex).log();
◆ closeElephant()
void org.turro.mail.pool.MailQueueConsumer.closeElephant |
( |
| ) |
|
◆ destroy()
static void org.turro.mail.pool.MailQueueConsumer.destroy |
( |
| ) |
|
|
static |
◆ getInstance()
Definition at line 107 of file MailQueueConsumer.java.
108 if(INSTANCE ==
null) {
110 MAIL_QUEUE =
new Thread(INSTANCE,
"ElephantMailQueue");
◆ run()
void org.turro.mail.pool.MailQueueConsumer.run |
( |
| ) |
|
Definition at line 79 of file MailQueueConsumer.java.
82 while (running.get()) {
83 MailQueueItem item = QUEUE.take();
84 if(!running.get())
break;
87 }
catch(Exception ex) {
88 WebLoggers.severe(
this).exception(ex).log();
92 }
catch (InterruptedException e) {
93 Thread.currentThread().interrupt();
◆ size()
int org.turro.mail.pool.MailQueueConsumer.size |
( |
| ) |
|
The documentation for this class was generated from the following file: