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.TypeMailQueue.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
IOExceptionpublic void enQueue(org.apache.mailet.Mail mail,
long delay,
TimeUnit unit)
throws MailQueue.MailQueueException
MailQueueenQueue in interface MailQueueMailQueue.MailQueueExceptionpublic void enQueue(org.apache.mailet.Mail mail)
throws MailQueue.MailQueueException
MailQueueenQueue in interface MailQueueMailQueue.MailQueueExceptionpublic MailQueue.MailQueueItem deQueue() throws MailQueue.MailQueueException
MailQueuedeQueue in interface MailQueueMailQueue.MailQueueExceptionpublic long getSize()
throws MailQueue.MailQueueException
ManageableMailQueuegetSize in interface ManageableMailQueueMailQueue.MailQueueExceptionpublic long flush()
throws MailQueue.MailQueueException
ManageableMailQueueflush in interface ManageableMailQueueMailQueue.MailQueueExceptionpublic long clear()
throws MailQueue.MailQueueException
ManageableMailQueueclear in interface ManageableMailQueueMailQueue.MailQueueExceptionpublic long remove(ManageableMailQueue.Type type, String value) throws MailQueue.MailQueueException
remove in interface ManageableMailQueueMailQueue.MailQueueExceptionManageableMailQueue.remove(org.apache.james.queue.api.ManageableMailQueue.Type, String)public ManageableMailQueue.MailQueueIterator browse() throws MailQueue.MailQueueException
ManageableMailQueuebrowse in interface ManageableMailQueueMailQueue.MailQueueExceptionCopyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.