public class ReliableMessageListenerAdapter<E> extends Object implements ReliableMessageListener<E>
Constructor and Description |
---|
ReliableMessageListenerAdapter(MessageListener<E> messageListener) |
Modifier and Type | Method and Description |
---|---|
boolean |
isLossTolerant()
Checks if this ReliableMessageListener is able to deal with message loss.
|
boolean |
isTerminal(Throwable failure)
Checks if the ReliableMessageListener should be terminated based on an exception thrown while calling
MessageListener.onMessage(com.hazelcast.core.Message) . |
void |
onMessage(Message<E> message)
Invoked when a message is received for the added topic.
|
long |
retrieveInitialSequence()
Retrieves the initial sequence from which this ReliableMessageListener should start.
|
void |
storeSequence(long sequence)
Informs the ReliableMessageListener that it should store the sequence.
|
String |
toString() |
public ReliableMessageListenerAdapter(MessageListener<E> messageListener)
public long retrieveInitialSequence()
ReliableMessageListener
retrieveInitialSequence
in interface ReliableMessageListener<E>
public void storeSequence(long sequence)
ReliableMessageListener
storeSequence
in interface ReliableMessageListener<E>
sequence
- the sequencepublic boolean isLossTolerant()
ReliableMessageListener
isLossTolerant
in interface ReliableMessageListener<E>
public void onMessage(Message<E> message)
MessageListener
onMessage
in interface MessageListener<E>
message
- the message that is received for the added topicpublic boolean isTerminal(Throwable failure)
ReliableMessageListener
MessageListener.onMessage(com.hazelcast.core.Message)
.isTerminal
in interface ReliableMessageListener<E>
failure
- the exception thrown while calling MessageListener.onMessage(com.hazelcast.core.Message)
.Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.