public class TwoPhaseCommitInterceptor extends ChannelInterceptorBase
Title:
Description:
Company:
Modifier and Type | Class and Description |
---|---|
static class |
TwoPhaseCommitInterceptor.MapEntry |
ChannelInterceptor.InterceptorEvent
Modifier and Type | Field and Description |
---|---|
protected boolean |
deepclone |
protected long |
expire |
protected HashMap<UniqueId,TwoPhaseCommitInterceptor.MapEntry> |
messages |
optionFlag
Constructor and Description |
---|
TwoPhaseCommitInterceptor() |
Modifier and Type | Method and Description |
---|---|
boolean |
getDeepclone() |
long |
getExpire() |
void |
heartbeat()
The
heartbeat() method gets invoked periodically
to allow interceptors to clean up resources, time out object and
perform actions that are unrelated to sending/receiving data. |
void |
messageReceived(ChannelMessage msg)
the
messageReceived is invoked when a message is received. |
void |
sendMessage(Member[] destination,
ChannelMessage msg,
InterceptorPayload payload)
The
sendMessage method is called when a message is being sent to one more destinations. |
void |
setDeepclone(boolean deepclone) |
void |
setExpire(long expire) |
accept, fireInterceptorEvent, getChannel, getLocalMember, getMember, getMembers, getNext, getOptionFlag, getPrevious, hasMembers, memberAdded, memberDisappeared, okToProcess, setChannel, setNext, setOptionFlag, setPrevious, start, stop
protected HashMap<UniqueId,TwoPhaseCommitInterceptor.MapEntry> messages
protected long expire
protected boolean deepclone
public void sendMessage(Member[] destination, ChannelMessage msg, InterceptorPayload payload) throws ChannelException
ChannelInterceptor
sendMessage
method is called when a message is being sent to one more destinations.
The interceptor can modify any of the parameters and then pass on the message down the stack by
invoking getNext().sendMessage(destination,msg,payload)
getNext().sendMessage(destination,msg,payload)
sendMessage
in interface ChannelInterceptor
sendMessage
in class ChannelInterceptorBase
destination
- Member[] - the destination for this messagemsg
- ChannelMessage - the message to be sentpayload
- InterceptorPayload - the payload, carrying an error handler and future useful data, can be nullChannelException
- if a serialization error happens.ErrorHandler
,
InterceptorPayload
public void messageReceived(ChannelMessage msg)
ChannelInterceptor
messageReceived
is invoked when a message is received.
ChannelMessage.getAddress()
is the sender, or the reply-to address
if it has been overwritten.messageReceived
in interface ChannelInterceptor
messageReceived
in class ChannelInterceptorBase
msg
- ChannelMessagepublic boolean getDeepclone()
public long getExpire()
public void setDeepclone(boolean deepclone)
public void setExpire(long expire)
public void heartbeat()
ChannelInterceptor
heartbeat()
method gets invoked periodically
to allow interceptors to clean up resources, time out object and
perform actions that are unrelated to sending/receiving data.heartbeat
in interface ChannelInterceptor
heartbeat
in interface Heartbeat
heartbeat
in class ChannelInterceptorBase
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.