public class NoOpMessagePersister extends Object implements MessagePersister
| Constructor and Description |
|---|
NoOpMessagePersister() |
| Modifier and Type | Method and Description |
|---|---|
Set<DelayableImmutableMessage> |
fetchAll(String messageQueueId)
Fetches all messages from persistence which have not yet been
MessagePersister.remove(String,DelayableImmutableMessage). |
boolean |
persist(String messageQueueId,
DelayableImmutableMessage message)
Called with the message to be persisted.
|
void |
remove(String messageQueueId,
DelayableImmutableMessage message)
Called once the message queue has actually processed the message previously added to the persistence by calling
MessagePersister.persist(String,DelayableImmutableMessage). |
public boolean persist(String messageQueueId, DelayableImmutableMessage message)
MessagePersisterfalse. Implementations of this method can block until the persisting was
successful, but be aware that this might impact performance.persist in interface MessagePersistermessageQueueId - the unique ID of the message queue for which the message is being persistedmessage - the message which is a candidate for persistingtrue if the message is persisted, false if not.public Set<DelayableImmutableMessage> fetchAll(String messageQueueId)
MessagePersisterMessagePersister.remove(String,DelayableImmutableMessage).
The MessageQueue will call this during startup to fetch any messages which were
persisted but not consumed during a previous lifetime of the joynr runtime in order to re-add them to the queue.fetchAll in interface MessagePersistermessageQueueId - the ID of the message queue for which to fetch the persisted messages.public void remove(String messageQueueId, DelayableImmutableMessage message)
MessagePersisterMessagePersister.persist(String,DelayableImmutableMessage).
The implementation of this method should ensure that the message is actually removed
from the persistence, and should block until this has been done successfully.remove in interface MessagePersistermessageQueueId - the ID of the message queue which consumed the message.message - the message which has been consumed by the queue and should be removed from persistence.Copyright © 2021. All rights reserved.