Logo Search packages:      
Sourcecode: libjgroups-java version File versions

org::jgroups::protocols::UDP Class Reference

Inheritance diagram for org::jgroups::protocols::UDP:

org::jgroups::protocols::TP org::jgroups::stack::Protocol

List of all members.


Detailed Description

IP multicast transport based on UDP. Messages to the group (msg.dest == null) will be multicast (to all group members), whereas point-to-point messages (msg.dest != null) will be unicast to a single member. Uses a multicast and a unicast socket.

The following properties are read by the UDP protocol:

Author:
Bela Ban
Version:
Id
UDP.java,v 1.156.2.9 2008/06/02 05:59:49 belaban Exp

Definition at line 45 of file UDP.java.


Public Member Functions

void destroy ()
Object down (Event evt)
boolean downThreadEnabled ()
Map< String, Object > dumpStats ()
void enableStats (boolean flag)
String getBindAddress ()
int getBindPort ()
boolean getBindToAllInterfaces ()
String getChannelName ()
Executor getDefaultThreadPool ()
ThreadFactory getDefaultThreadPoolThreadFactory ()
Protocol getDownProtocol ()
long getIncomingKeepAliveTime ()
int getIncomingMaxPoolSize ()
int getIncomingMaxQueueSize ()
long getIncomingMessages ()
int getIncomingMinPoolSize ()
int getIncomingPoolSize ()
int getIncomingQueueSize ()
String getInfo ()
Address getLocalAddress ()
int getMaxBundleSize ()
long getMaxBundleTimeout ()
String getName ()
long getNumBytesReceived ()
long getNumBytesSent ()
long getNumMessagesReceived ()
long getNumMessagesSent ()
long getOOBKeepAliveTime ()
int getOOBMaxPoolSize ()
int getOOBMaxQueueSize ()
long getOOBMessages ()
int getOOBMinPoolSize ()
int getOOBPoolSize ()
int getOOBQueueSize ()
Executor getOOBThreadPool ()
ThreadFactory getOOBThreadPoolThreadFactory ()
Properties getProperties ()
ProtocolStack getProtocolStack ()
java.util.List getReceiveInterfaces ()
java.util.List getSendInterfaces ()
String getSingletonName ()
ThreadFactory getThreadFactory ()
String getThreadNamingPattern ()
TimeScheduler getTimer ()
ThreadFactory getTimerThreadFactory ()
Protocol getUpProtocol ()
ConcurrentMap< String, ProtocolgetUpProtocols ()
void init () throws Exception
boolean isDefaulThreadPoolEnabled ()
boolean isDiscardIncompatiblePackets ()
boolean isEnable_unicast_bundling ()
boolean isEnableBundling ()
boolean isLoopback ()
boolean isOOBThreadPoolEnabled ()
boolean isReceiveOnAllInterfaces ()
boolean isSendOnAllInterfaces ()
boolean isUseIncomingPacketHandler ()
void postUnmarshalling (Message msg, Address dest, Address src, boolean multicast)
void postUnmarshallingList (Message msg, Address dest, boolean multicast)
String printStats ()
Vector< Integer > providedDownServices ()
Vector< Integer > providedUpServices ()
Vector< Integer > requiredDownServices ()
Vector< Integer > requiredUpServices ()
void resetStats ()
void run ()
void sendToAllMembers (byte[] data, int offset, int length) throws Exception
void sendToSingleMember (Address dest, byte[] data, int offset, int length) throws Exception
void sendUpLocalAddressEvent ()
void setBindAddress (String bind_addr) throws UnknownHostException
void setBindPort (int port)
void setBindToAllInterfaces (boolean flag)
void setDefaultThreadPool (Executor thread_pool)
void setDefaultThreadPoolThreadFactory (ThreadFactory factory)
void setDiscardIncompatiblePackets (boolean flag)
void setDownProtocol (Protocol down_prot)
void setEnable_unicast_bundling (boolean enable_unicast_bundling)
void setEnableBundling (boolean flag)
void setIncomingKeepAliveTime (long time)
void setIncomingMaxPoolSize (int size)
void setIncomingMinPoolSize (int size)
void setLoopback (boolean b)
void setMaxBundleSize (int size)
void setMaxBundleTimeout (long timeout)
void setOOBKeepAliveTime (long time)
void setOOBMaxPoolSize (int size)
void setOOBMinPoolSize (int size)
void setOOBThreadPool (Executor oob_thread_pool)
void setOOBThreadPoolThreadFactory (ThreadFactory factory)
boolean setProperties (Properties props)
boolean setPropertiesInternal (Properties props)
void setProtocolStack (ProtocolStack stack)
void setThreadFactory (ThreadFactory factory)
void setTimerThreadFactory (ThreadFactory factory)
void setUpProtocol (Protocol up_prot)
void start () throws Exception
boolean statsEnabled ()
void stop ()
String toString ()
 UDP ()
Object up (Event evt)
boolean upThreadEnabled ()

Protected Member Functions

DatagramSocket createDatagramSocketWithBindPort () throws Exception
DatagramSocket createEphemeralDatagramSocket () throws SocketException
Address createLocalAddress ()
TP getTransport ()
void handleConfigEvent (Map< String, Object > map)
void handleConnect () throws Exception
void handleDisconnect ()
Object handleDownEvent (Event evt)
void passToAllUpProtocols (Event evt)
final void receive (Address dest, Address sender, byte[] data, int offset, int length)
void setThreadNames ()
void unsetThreadNames ()

Static Protected Member Functions

static ExecutorService createThreadPool (int min_threads, int max_threads, long keep_alive_time, String rejection_policy, BlockingQueue< Runnable > queue, final ThreadFactory factory)

Protected Attributes

InetAddress bind_addr = null
String channel_name = null
boolean discard_incompatible_packets = false
Protocol down_prot = null
ThreadFactory global_thread_factory = null
Address local_addr = null
final Log log = LogFactory.getLog(this.getClass())
final HashSet< Addressmembers = new HashSet<Address>(11)
boolean persistent_ports = false
String persistent_ports_file = null
PortsManager pm = null
long pm_expiry_time = 30000L
final Properties props = new Properties()
ProtocolStack stack = null
boolean stats = true
String thread_naming_pattern = "cl"
TimeScheduler timer = null
ThreadFactory timer_thread_factory
Protocol up_prot = null
View view = null

Package Functions

void closeMulticastSocket ()
void closeSockets ()
void setBufferSizes ()
void startThreads () throws Exception
void stopThreads ()

Static Package Functions

 [static initializer]

Package Attributes

byte[] additional_data = null
int bind_port = 0
int connect_count = 0
ThreadFactory default_thread_factory = null
String diagnostics_addr = "224.0.0.75"
int diagnostics_port = 7500
final DataInputStream dis = new DataInputStream(in_stream)
boolean enable_bundling = false
boolean enable_diagnostics = true
boolean enable_unicast_bundling = true
TpHeader header
final ExposedByteArrayInputStream in_stream = new ExposedByteArrayInputStream(new byte[]{'0'})
IncomingMessageHandler incoming_msg_handler
Queue incoming_msg_queue = null
IncomingPacketHandler incoming_packet_handler = null
Queue incoming_packet_queue = null
int init_count = 0
boolean ip_mcast = true
int ip_ttl = 8
boolean loopback = false
int max_bundle_size = 65535
long max_bundle_timeout = 20
IpAddress mcast_addr = null
String mcast_addr_name = "228.8.8.8"
int mcast_port = 7600
Thread mcast_receiver = null
int mcast_recv_buf_size = 64000
int mcast_send_buf_size = 32000
MulticastSocket[] mcast_send_sockets = null
MulticastSocket mcast_sock = null
final String name = getName()
long num_bytes_received = 0
long num_bytes_sent = 0
long num_incoming_msgs_received = 0
long num_msgs_received = 0
long num_msgs_sent = 0
long num_oob_msgs_received = 0
int num_timer_threads = 4
ThreadFactory oob_thread_factory = null
Executor oob_thread_pool
boolean oob_thread_pool_enabled = true
long oob_thread_pool_keep_alive_time = 30000
int oob_thread_pool_max_threads = 10
int oob_thread_pool_min_threads = 2
BlockingQueue< Runnable > oob_thread_pool_queue = null
boolean oob_thread_pool_queue_enabled = true
int oob_thread_pool_queue_max_size = 500
String oob_thread_pool_rejection_policy = "Run"
ThreadGroup pool_thread_group = new ThreadGroup(Util.getGlobalThreadGroup(), "Thread Pools")
int port_range = 1
List< NetworkInterface > receive_interfaces = null
boolean receive_on_all_interfaces = false
List< NetworkInterface > send_interfaces = null
boolean send_on_all_interfaces = false
String singleton_name = null
DatagramSocket sock = null
Executor thread_pool
boolean thread_pool_enabled = true
long thread_pool_keep_alive_time = 30000
int thread_pool_max_threads = 10
int thread_pool_min_threads = 2
BlockingQueue< Runnable > thread_pool_queue = null
boolean thread_pool_queue_enabled = true
int thread_pool_queue_max_size = 500
String thread_pool_rejection_policy = "Run"
int tos = 8
UcastReceiver ucast_receiver = null
int ucast_recv_buf_size = 64000
int ucast_send_buf_size = 32000
boolean use_concurrent_stack = true
boolean use_incoming_packet_handler = true
boolean use_local_host = false

Static Package Attributes

static NumberFormat f
static final byte LIST = 1
static final byte MULTICAST = 2
static final byte OOB = 4

Private Member Functions

void _send (InetAddress dest, int port, boolean mcast, byte[] data, int offset, int length) throws Exception
void bindToInterfaces (List< NetworkInterface > interfaces, MulticastSocket s, InetAddress mcastAddr) throws IOException
void closeSocket ()
void createSockets () throws Exception
String dumpSocketInfo () throws Exception
void setBufferSize (DatagramSocket sock, int send_buf_size, int recv_buf_size)

Static Private Attributes

static final BoundedList< Integer > last_ports_used = new BoundedList<Integer>(100)
static final String MCAST_RECEIVER_THREAD_NAME = "UDP mcast"

Classes

class  UcastReceiver

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index