com.sun.enterprise.mgmt.transport
Class VirtualMulticastSender
java.lang.Object
com.sun.enterprise.mgmt.transport.AbstractMulticastMessageSender
com.sun.enterprise.mgmt.transport.VirtualMulticastSender
- All Implemented Interfaces:
- MulticastMessageSender, ShoalMessageSender
public class VirtualMulticastSender
- extends AbstractMulticastMessageSender
This class extends BlockingIOMulticastSender
for supporting the circumstance that cluster members are located beyond one subnet
or multicast traffic is disabled
virtualPeerIdList should contain PeerIDs of cluster members which are located beyond one subnet.
So, this MulticastMessageSender will broadcast a message
to endpoints which virtualPeerIdList includes as well as one subnet on TCP protocol.
- Author:
- Bongjae Chang
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VirtualMulticastSender
public VirtualMulticastSender(NetworkManager networkManager,
List<PeerID> initialPeerIds)
throws IOException
- Throws:
IOException
getVirtualPeerIDSet
public Set<PeerID> getVirtualPeerIDSet()
start
public void start()
throws IOException
- Description copied from class:
AbstractMulticastMessageSender
-
- Specified by:
start in interface ShoalMessageSender- Overrides:
start in class AbstractMulticastMessageSender
- Throws:
IOException
stop
public void stop()
throws IOException
- Description copied from class:
AbstractMulticastMessageSender
-
- Specified by:
stop in interface ShoalMessageSender- Overrides:
stop in class AbstractMulticastMessageSender
- Throws:
IOException
doBroadcast
protected boolean doBroadcast(Message message)
throws IOException
- Broadcasts or Multicasts the given
Message to all members
- Specified by:
doBroadcast in class AbstractMulticastMessageSender
- Parameters:
message - a message which is sent to all members
- Returns:
- true if the message is sent to all members successfully, otherwise false
- Throws:
IOException - if I/O error occurs or given parameters are not valid
removeUnknownInstances
public void removeUnknownInstances()
- Remove all PeerID entries added via DISCOVERY_URI_LIST. These entries have "Unknown_" at start for instance
name.
If there are not removed, then we send to those DISCOVERY_URI_LIST instances multiple times.
Copyright © 2012. All Rights Reserved.