public class LockingMailQueue extends Object implements MailQueue
Modifier and Type | Field and Description |
---|---|
static String |
copyright |
protected ReadWriteLock |
lock |
protected MailQueue |
mailQueue |
Constructor and Description |
---|
LockingMailQueue(MailQueue mailQueue) |
Modifier and Type | Method and Description |
---|---|
String |
enqueue(Email email) |
List<String> |
getEnqueuedEmailIds() |
boolean |
isKeepSent() |
Email |
loadEmail(String id) |
void |
markFailed(String id) |
void |
markSent(String id) |
void |
setKeepSent(boolean keepSent) |
public static final String copyright
protected final MailQueue mailQueue
protected final ReadWriteLock lock
public LockingMailQueue(MailQueue mailQueue)
public String enqueue(Email email) throws QueueException
enqueue
in interface MailQueue
QueueException
public List<String> getEnqueuedEmailIds() throws QueueException
getEnqueuedEmailIds
in interface MailQueue
QueueException
public Email loadEmail(String id) throws QueueException
loadEmail
in interface MailQueue
QueueException
public void markSent(String id) throws QueueException
markSent
in interface MailQueue
QueueException
public void markFailed(String id) throws QueueException
markFailed
in interface MailQueue
QueueException
public void setKeepSent(boolean keepSent)
setKeepSent
in interface MailQueue
public boolean isKeepSent()
isKeepSent
in interface MailQueue