public class ReplicationTransmitter extends Object implements ChannelSender
Constructor and Description |
---|
ReplicationTransmitter() |
Modifier and Type | Method and Description |
---|---|
void |
add(Member member)
add new cluster member and create sender ( s. replicationMode) transfer
current properties to sender
|
Channel |
getChannel()
Return the channel that is related to this ChannelSender
|
MultiPointSender |
getTransport() |
void |
heartbeat()
Call transmitter to check for sender socket status
|
void |
remove(Member member)
remove sender from transmitter. ( deregister mbean and disconnect sender )
|
void |
sendMessage(ChannelMessage message,
Member[] destination)
Send data to one member
|
void |
setChannel(Channel channel)
Set the channel that is related to this ChannelSender
|
void |
setTransport(MultiPointSender transport) |
void |
start()
start the sender and register transmitter mbean
|
void |
stop()
stop the sender and deregister mbeans (transmitter, senders)
|
public MultiPointSender getTransport()
public void setTransport(MultiPointSender transport)
public void sendMessage(ChannelMessage message, Member[] destination) throws ChannelException
sendMessage
in interface ChannelSender
message
- ChannelMessage - the message to be sentdestination
- Member[] - the destinationsChannelException
- - if an error happens, the ChannelSender MUST report
individual send failures on a per member basis, using ChannelException.addFaultyMemberChannelSender.sendMessage(org.apache.catalina.tribes.ChannelMessage, org.apache.catalina.tribes.Member[])
public void start() throws IOException
start
in interface ChannelSender
IOException
- if preprocessing takes place and an error happensChannelSender.start()
public void stop()
stop
in interface ChannelSender
ChannelSender.stop()
public void heartbeat()
heartbeat
in interface ChannelSender
heartbeat
in interface Heartbeat
SimpleTcpCluster.backgroundProcess()
public void add(Member member)
add
in interface ChannelSender
member
- MemberChannelSender.add(org.apache.catalina.tribes.Member)
public void remove(Member member)
remove
in interface ChannelSender
member
- MemberChannelSender.remove(org.apache.catalina.tribes.Member)
public Channel getChannel()
ChannelSender
getChannel
in interface ChannelSender
public void setChannel(Channel channel)
ChannelSender
setChannel
in interface ChannelSender
channel
- The channelCopyright © 2000-2016 Apache Software Foundation. All Rights Reserved.