public class FileMailQueue extends Object implements ManageableMailQueue
ManageableMailQueue
implementation which use the fs to store Mail
's
On create of the FileMailQueue
the init()
will get called. This takes care of load the needed meta-data into memory for fast access.ManageableMailQueue.MailQueueItemView, ManageableMailQueue.MailQueueIterator, ManageableMailQueue.Type
MailQueue.MailQueueException, MailQueue.MailQueueItem
Constructor and Description |
---|
FileMailQueue(File parentDir,
String queuename,
boolean sync,
org.slf4j.Logger log) |
Modifier and Type | Method and Description |
---|---|
ManageableMailQueue.MailQueueIterator |
browse()
Allow to browse the queues content.
|
long |
clear()
Remove all mails from the queue
|
MailQueue.MailQueueItem |
deQueue()
Dequeue the next ready-to-process Mail of the queue.
|
void |
enQueue(org.apache.mailet.Mail mail)
Enqueue the Mail to the queue
|
void |
enQueue(org.apache.mailet.Mail mail,
long delay,
TimeUnit unit)
Enqueue the Mail to the queue.
|
long |
flush()
Flush the queue, which means it will make all message ready for dequeue
|
long |
getSize()
Return the size of the queue
|
long |
remove(ManageableMailQueue.Type type,
String value)
TODO: implement me
|
public FileMailQueue(File parentDir, String queuename, boolean sync, org.slf4j.Logger log) throws IOException
IOException
public void enQueue(org.apache.mailet.Mail mail, long delay, TimeUnit unit) throws MailQueue.MailQueueException
MailQueue
enQueue
in interface MailQueue
MailQueue.MailQueueException
public void enQueue(org.apache.mailet.Mail mail) throws MailQueue.MailQueueException
MailQueue
enQueue
in interface MailQueue
MailQueue.MailQueueException
public MailQueue.MailQueueItem deQueue() throws MailQueue.MailQueueException
MailQueue
deQueue
in interface MailQueue
MailQueue.MailQueueException
public long getSize() throws MailQueue.MailQueueException
ManageableMailQueue
getSize
in interface ManageableMailQueue
MailQueue.MailQueueException
public long flush() throws MailQueue.MailQueueException
ManageableMailQueue
flush
in interface ManageableMailQueue
MailQueue.MailQueueException
public long clear() throws MailQueue.MailQueueException
ManageableMailQueue
clear
in interface ManageableMailQueue
MailQueue.MailQueueException
public long remove(ManageableMailQueue.Type type, String value) throws MailQueue.MailQueueException
remove
in interface ManageableMailQueue
MailQueue.MailQueueException
ManageableMailQueue.remove(org.apache.james.queue.api.ManageableMailQueue.Type, String)
public ManageableMailQueue.MailQueueIterator browse() throws MailQueue.MailQueueException
ManageableMailQueue
browse
in interface ManageableMailQueue
MailQueue.MailQueueException
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.