◆ addToQueue() [1/4]
void org.turro.mail.impl.MailQueueConsumer.addToQueue |
( |
Collection< MailMessage > |
pool | ) |
|
◆ addToQueue() [2/4]
void org.turro.mail.impl.MailQueueConsumer.addToQueue |
( |
Collection< MailMessage > |
pool, |
|
|
Consumer |
onFinish |
|
) |
| |
Definition at line 41 of file MailQueueConsumer.java.
42 if(pool ==
null)
return;
43 int index = 0,
size = pool.size();
44 for(MailMessage mail : pool) {
◆ addToQueue() [3/4]
void org.turro.mail.impl.MailQueueConsumer.addToQueue |
( |
MailMessage |
mail | ) |
|
◆ addToQueue() [4/4]
void org.turro.mail.impl.MailQueueConsumer.addToQueue |
( |
MailMessage |
mail, |
|
|
Consumer |
onFinish |
|
) |
| |
Definition at line 57 of file MailQueueConsumer.java.
59 if(!QUEUE.offer(
new MailQueueItem(mail, onFinish), 60L, TimeUnit.MINUTES)) {
60 Logger.getLogger(MailQueueConsumer.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
"Too long attempt"));
62 }
catch (InterruptedException ex) {
63 Logger.getLogger(MailQueueConsumer.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
◆ destroy()
static void org.turro.mail.impl.MailQueueConsumer.destroy |
( |
| ) |
|
|
static |
◆ getInstance()
Definition at line 105 of file MailQueueConsumer.java.
106 if(INSTANCE ==
null) {
107 INSTANCE =
new MailQueueConsumer();
108 MAIL_QUEUE =
new Thread(INSTANCE,
"ElephantMailQueue");
◆ run()
void org.turro.mail.impl.MailQueueConsumer.run |
( |
| ) |
|
Definition at line 77 of file MailQueueConsumer.java.
80 while (running.get()) {
81 MailQueueItem item = QUEUE.take();
82 if(!running.get())
break;
85 }
catch(Exception ex) {
86 Logger.getLogger(MailQueueConsumer.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
90 }
catch (InterruptedException e) {
91 Thread.currentThread().interrupt();
◆ size()
int org.turro.mail.impl.MailQueueConsumer.size |
( |
| ) |
|
The documentation for this class was generated from the following file: