Interface QueueRepository
-
- All Known Subinterfaces:
TapeCatalogService
- All Known Implementing Classes:
QueueRepositoryImpl
,TapeCatalogRepository
,TapeCatalogServiceImpl
public interface QueueRepository
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
add(QueueMessageEntity queueMessageEntity)
void
addIfAbsent(java.util.List<QueryCriteria> criteria, QueueMessageEntity queueMessageEntity)
long
complete(java.lang.String queueMessageId)
Make QueueMessageEntity COMPLETEDlong
initializeOnBootstrap()
long
markError(java.lang.String queueMessageId)
Mark queueEntity as Errorlong
markReady(java.lang.String queueMessageId)
Mark queueEntity as READY<T> java.util.Optional<T>
receive(QueueMessageType messageType)
<T> java.util.Optional<T>
receive(QueueMessageType messageType, boolean usePriority)
<T> java.util.Optional<T>
receive(org.bson.conversions.Bson inQuery, QueueMessageType messageType)
<T> java.util.Optional<T>
receive(org.bson.conversions.Bson inQuery, QueueMessageType messageType, boolean usePriority)
<T> java.util.Optional<T>
receive(org.bson.conversions.Bson inQuery, org.bson.conversions.Bson inUpdate, QueueMessageType messageType)
<T> java.util.Optional<T>
receive(org.bson.conversions.Bson inQuery, org.bson.conversions.Bson inUpdate, QueueMessageType messageType, boolean usePriority)
long
remove(java.lang.String queueMessageId)
-
-
-
Method Detail
-
add
void add(QueueMessageEntity queueMessageEntity) throws QueueException
- Throws:
QueueException
-
addIfAbsent
void addIfAbsent(java.util.List<QueryCriteria> criteria, QueueMessageEntity queueMessageEntity) throws QueueException
- Throws:
QueueException
-
remove
long remove(java.lang.String queueMessageId) throws QueueException
- Throws:
QueueException
-
complete
long complete(java.lang.String queueMessageId) throws QueueException
Make QueueMessageEntity COMPLETED- Parameters:
queueMessageId
-- Returns:
- Throws:
QueueException
-
markError
long markError(java.lang.String queueMessageId) throws QueueException
Mark queueEntity as Error- Parameters:
queueMessageId
-- Returns:
- Throws:
QueueException
-
markReady
long markReady(java.lang.String queueMessageId) throws QueueException
Mark queueEntity as READY- Parameters:
queueMessageId
-- Returns:
- Throws:
QueueException
-
initializeOnBootstrap
long initializeOnBootstrap()
-
receive
<T> java.util.Optional<T> receive(QueueMessageType messageType) throws QueueException
- Throws:
QueueException
-
receive
<T> java.util.Optional<T> receive(QueueMessageType messageType, boolean usePriority) throws QueueException
- Throws:
QueueException
-
receive
<T> java.util.Optional<T> receive(org.bson.conversions.Bson inQuery, QueueMessageType messageType) throws QueueException
- Throws:
QueueException
-
receive
<T> java.util.Optional<T> receive(org.bson.conversions.Bson inQuery, QueueMessageType messageType, boolean usePriority) throws QueueException
- Throws:
QueueException
-
receive
<T> java.util.Optional<T> receive(org.bson.conversions.Bson inQuery, org.bson.conversions.Bson inUpdate, QueueMessageType messageType) throws QueueException
- Throws:
QueueException
-
receive
<T> java.util.Optional<T> receive(org.bson.conversions.Bson inQuery, org.bson.conversions.Bson inUpdate, QueueMessageType messageType, boolean usePriority) throws QueueException
- Type Parameters:
T
-- Parameters:
inQuery
- filterinUpdate
- atomic updatemessageType
-usePriority
- if true sort by priority and take first- Returns:
- Throws:
QueueException
-
-