Package org.jgroups.protocols
Class BasicTCP
java.lang.Object
org.jgroups.stack.Protocol
org.jgroups.protocols.TP
org.jgroups.protocols.BasicTCP
Shared base class for tcpip protocols
- Author:
- Scott Marlow
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jgroups.protocols.TP
TP.Bundler, TP.DiagnosticsHandler, TP.ProbeHandler, TP.ProtocolAdapter -
Field Summary
FieldsFields inherited from class org.jgroups.protocols.TP
bind_addr, bind_interface_str, bind_port, bundler, bundler_capacity, bundler_type, can_bind_to_mcast_addr, channel_name, connect_count, connectLock, default_thread_factory, diag_handler, diagnostics_addr, diagnostics_port, discard_incompatible_packets, enable_bundling, enable_diagnostics, enable_unicast_bundling, f, global_thread_factory, header, last_discovery_request, LIST, local_addr, log_discard_msgs, logical_addr_cache, logical_addr_cache_expiration, logical_addr_cache_max_size, loopback, max_bundle_size, max_bundle_timeout, members, MULTICAST, num_bytes_received, num_bytes_sent, num_incoming_msgs_received, num_msgs_received, num_msgs_sent, num_oob_msgs_received, OOB, oob_thread_factory, oob_thread_pool, oob_thread_pool_enabled, oob_thread_pool_keep_alive_time, oob_thread_pool_max_threads, oob_thread_pool_min_threads, oob_thread_pool_queue, oob_thread_pool_queue_enabled, oob_thread_pool_queue_max_size, pool_thread_group, port_range, preregistered_probe_handlers, print_function, receive_interfaces, receive_on_all_interfaces, singleton_name, socket_factory, thread_naming_pattern, thread_pool, thread_pool_enabled, thread_pool_keep_alive_time, thread_pool_max_threads, thread_pool_min_threads, thread_pool_queue, thread_pool_queue_enabled, thread_pool_queue_max_size, thread_pool_rejection_policy, tick_time, timer, timer_keep_alive_time, timer_max_threads, timer_min_threads, timer_queue_max_size, timer_thread_factory, timer_type, up_prots, wheel_size, who_has_cache -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonggetInfo()longprotected ObjecthandleDownEvent(Event evt) voidinit()Called after instance has been created (null constructor) and before protocol is started.abstract StringvoidConnectionMap.Receiver interfaceabstract voidretainAll(Collection<Address> members) abstract voidvoidsendMulticast(byte[] data, int offset, int length) Send to all members in the group.voidsendUnicast(PhysicalAddress dest, byte[] data, int offset, int length) Send a unicast to 1 member.voidsetConnExpireTime(long conn_expire_time) voidsetReaperInterval(long reaper_interval) booleanWhether or not hardware multicasting is supportedMethods inherited from class org.jgroups.protocols.TP
addPhysicalAddressToCache, clearLogicalAddressCache, createThreadPool, destroy, dispatchToThreadPool, doSend, down, dumpTimerTasks, evictLogicalAddressCache, fetchLocalAddresses, getBindAddress, getBindAddressAsInetAddress, getBindPort, getBindToAllInterfaces, getBundlerBufferSize, getDefaultThreadPool, getDefaultThreadPoolThreadFactory, getLogDiscardMessages, getMaxBundleSize, getMaxBundleTimeout, getNumBytesReceived, getNumBytesSent, getNumMessagesReceived, getNumMessagesSent, getNumTimerTasks, getOOBMaxQueueSize, getOOBMessages, getOOBPoolSize, getOOBQueueSize, getOOBThreadPool, getOOBThreadPoolKeepAliveTime, getOOBThreadPoolMaxThreads, getOOBThreadPoolMinThreads, getOOBThreadPoolThreadFactory, getPhysicalAddress, getPhysicalAddressFromCache, getPoolThreadGroup, getPortRange, getReceiveInterfaces, getRegularMaxQueueSize, getRegularMessages, getRegularPoolSize, getRegularQueueSize, getSendInterfaces, getSingletonName, getSocketFactory, getThreadFactory, getThreadNamingPattern, getThreadPoolKeepAliveTime, getThreadPoolMaxThreads, getThreadPoolMinThreads, getTimer, getTimerClass, getTimerKeepAliveTime, getTimerMaxThreads, getTimerMinThreads, getTimerQueueSize, getTimerThreadFactory, getTimerThreads, getUpProtocols, handleConnect, handleDisconnect, isDefaulThreadPoolEnabled, isDiscardIncompatiblePackets, isEnableBundling, isEnableUnicastBundling, isLoopback, isOOBThreadPoolEnabled, isReceiveOnAllInterfaces, isSendOnAllInterfaces, isSingleton, isUseIncomingPacketHandler, parseRejectionPolicy, passMessageUp, passToAllUpProtocols, printLogicalAddressCache, readMessage, readMessageList, registerLocalAddress, registerProbeHandler, removeLogicalAddressFromCache, resetStats, send, sendToAllPhysicalAddresses, sendToSingleMember, setBindAddress, setBindPort, setBindToAllInterfaces, setDefaultThreadPool, setDefaultThreadPoolThreadFactory, setDiscardIncompatiblePackets, setEnableBundling, setEnableUnicastBundling, setInAllThreadFactories, setLogDiscardMessages, setLoopback, setMaxBundleSize, setMaxBundleTimeout, setOOBRejectionPolicy, setOOBThreadPool, setOOBThreadPoolKeepAliveTime, setOOBThreadPoolMaxThreads, setOOBThreadPoolMinThreads, setOOBThreadPoolThreadFactory, setPortRange, setRegularRejectionPolicy, setSocketFactory, setSourceAddress, setThreadFactory, setThreadNames, setThreadPoolKeepAliveTime, setThreadPoolMaxThreads, setThreadPoolMinThreads, setThreadPoolQueueEnabled, setTimerKeepAliveTime, setTimerMaxThreads, setTimerMinThreads, setTimerThreadFactory, setUseConcurrentStack, shutdownThreadPool, start, stop, toString, unregisterProbeHandler, unsetThreadNames, up, verifyRejectionPolicy, writeMessage, writeMessageListMethods inherited from class org.jgroups.stack.Protocol
downThreadEnabled, dumpStats, enableStats, getConfigurableObjects, getDownProtocol, getId, getLevel, getName, getProperties, getProtocolStack, getTransport, getUpProtocol, getValue, isErgonomics, printStats, providedDownServices, providedUpServices, requiredDownServices, requiredUpServices, setDownProtocol, setErgonomics, setId, setLevel, setProperties, setPropertiesInternal, setProperty, setProtocolStack, setUpProtocol, setValue, setValues, statsEnabled, upThreadEnabled
-
Field Details
-
reaper_interval
protected long reaper_interval -
conn_expire_time
protected long conn_expire_time
-
-
Constructor Details
-
BasicTCP
protected BasicTCP()
-
-
Method Details
-
supportsMulticasting
public boolean supportsMulticasting()Description copied from class:TPWhether or not hardware multicasting is supported- Specified by:
supportsMulticastingin classTP
-
getReaperInterval
public long getReaperInterval() -
setReaperInterval
public void setReaperInterval(long reaper_interval) -
getConnExpireTime
public long getConnExpireTime() -
setConnExpireTime
public void setConnExpireTime(long conn_expire_time) -
init
Description copied from class:ProtocolCalled after instance has been created (null constructor) and before protocol is started. Properties are already set. Other protocols are not yet connected and events cannot yet be sent. -
sendMulticast
Description copied from class:TPSend to all members in the group. UDP would use an IP multicast message, whereas TCP would send N messages, one for each member- Specified by:
sendMulticastin classTP- Parameters:
data- The data to be sent. This is not a copy, so don't modify itoffset-length-- Throws:
Exception
-
sendUnicast
Description copied from class:TPSend a unicast to 1 member. Note that the destination address is a *physical*, not a logical address- Specified by:
sendUnicastin classTP- Parameters:
dest- Must be a non-null unicast addressdata- The data to be sent. This is not a copy, so don't modify itoffset-length-- Throws:
Exception
-
getInfo
-
printConnections
-
send
- Throws:
Exception
-
retainAll
-
receive
ConnectionMap.Receiver interface -
handleDownEvent
- Overrides:
handleDownEventin classTP
-