
com.codeheadsystems.queue.Queue Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of local-queue Show documentation
Show all versions of local-queue Show documentation
LQ: a minimalistic local queue
The newest version!
package com.codeheadsystems.queue;
import java.util.Map;
import java.util.Optional;
/**
* The interface Queue.
*/
public interface Queue {
/**
* Enqueue message.
*
* @param messageType the message type
* @param payload the payload
* @return the message if it could be enqueued.
*/
Optional enqueue(final String messageType,
final String payload);
/**
* Gets state.
*
* @param message the message
* @return the state if it is found.
*/
Optional getState(final Message message);
/**
* Provides the list of messages enqueued within the system for each state.
*
* @return map list.
*/
Map getMessageStateCounts();
/**
* Clear all.
*/
void clearAll();
/**
* Clear.
*
* @param message the message
*/
void clear(final Message message);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy