Class PriorityQueueManager
java.lang.Object
it.ozimov.springboot.mail.service.defaultimpl.PriorityQueueManager
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidvoidintdequeueNext(Duration consumerCycle) booleanenqueue(EmailSchedulingData emailSchedulingData, boolean isFromPersistenceLayer) booleanprotected booleanprotected booleanprotected booleanprotected booleanlongintprotected voidprotected voidprotected void
-
Method Details
-
numberOfLevels
public int numberOfLevels() -
hasElements
public boolean hasElements() -
currentlyInQueue
public int currentlyInQueue() -
millisToNextEmail
public long millisToNextEmail() -
enqueue
-
completeEnqueue
public void completeEnqueue() -
dequeueNext
-
completeDequeue
public void completeDequeue() -
isCurrentOperationNone
protected boolean isCurrentOperationNone() -
isCurrentOperationClosing
protected boolean isCurrentOperationClosing() -
isCurrentOperationDequeuing
protected boolean isCurrentOperationDequeuing() -
isCurrentOperationEnqueuing
protected boolean isCurrentOperationEnqueuing() -
setCurrentOperationToEnqueuing
- Throws:
InterruptedException
-
setCurrentOperationToDequeuing
- Throws:
InterruptedException
-
setCurrentOperationToNone
protected void setCurrentOperationToNone() -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-