Class ReplicationTransmitter
java.lang.Object
org.apache.catalina.tribes.transport.ReplicationTransmitter
- All Implemented Interfaces:
ChannelSender
,Heartbeat
Transmit message to other cluster members
Actual senders are created based on the replicationMode
type
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add new cluster member and create sender ( s. replicationMode) transfer current properties to senderReturn the channel that is related to this ChannelSendervoid
Call transmitter to check for sender socket statusvoid
remove sender from transmitter. ( deregister mbean and disconnect sender )void
sendMessage
(ChannelMessage message, Member[] destination) Send data to one membervoid
setChannel
(Channel channel) Set the channel that is related to this ChannelSendervoid
setTransport
(MultiPointSender transport) void
start()
start the sender and register transmitter mbeanvoid
stop()
stop the sender and deregister mbeans (transmitter, senders)
-
Constructor Details
-
ReplicationTransmitter
public ReplicationTransmitter()
-
-
Method Details
-
getTransport
-
setTransport
-
sendMessage
Send data to one member- Specified by:
sendMessage
in interfaceChannelSender
- Parameters:
message
- ChannelMessage - the message to be sentdestination
- Member[] - the destinations- Throws:
ChannelException
- - if an error happens, the ChannelSender MUST report individual send failures on a per member basis, using ChannelException.addFaultyMember- See Also:
-
start
start the sender and register transmitter mbean- Specified by:
start
in interfaceChannelSender
- Throws:
IOException
- if preprocessing takes place and an error happens- See Also:
-
stop
public void stop()stop the sender and deregister mbeans (transmitter, senders)- Specified by:
stop
in interfaceChannelSender
- See Also:
-
heartbeat
public void heartbeat()Call transmitter to check for sender socket status- Specified by:
heartbeat
in interfaceChannelSender
- Specified by:
heartbeat
in interfaceHeartbeat
- See Also:
-
add
add new cluster member and create sender ( s. replicationMode) transfer current properties to sender- Specified by:
add
in interfaceChannelSender
- Parameters:
member
- Member- See Also:
-
remove
remove sender from transmitter. ( deregister mbean and disconnect sender )- Specified by:
remove
in interfaceChannelSender
- Parameters:
member
- Member- See Also:
-
getChannel
Description copied from interface:ChannelSender
Return the channel that is related to this ChannelSender- Specified by:
getChannel
in interfaceChannelSender
- Returns:
- Channel
-
setChannel
Description copied from interface:ChannelSender
Set the channel that is related to this ChannelSender- Specified by:
setChannel
in interfaceChannelSender
- Parameters:
channel
- The channel
-