Class TPConfig
java.lang.Object
org.jgroups.stack.Protocol
org.jgroups.protocols.TPConfig
- All Implemented Interfaces:
Lifecycle
- Direct Known Subclasses:
TP
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AsyncExecutor<Object> protected InetAddressprotected intThe port to which the transport binds.protected Bundlerprotected Stringprotected AsciiStringprotected final ReentrantLockprotected DiagnosticsHandlerprotected InetAddressprotected intprotected TpHeaderprotected booleanprotected longprotected PhysicalAddressprotected LocalTransportprotected Stringprotected booleanWhether warnings about messages from different groups are logged - private flag, not for common useprotected booleanprotected LazyRemovalCache<Address, PhysicalAddress> Maintains mappings between logical and physical addresses.protected longprotected intprotected Future<?> protected longprotected Stringprotected MessageProcessingPolicyprotected MsgStatsprotected intprotected static final LazyRemovalCache.Printable<Address, LazyRemovalCache.Entry<PhysicalAddress>> protected List<NetworkInterface> protected booleanprotected RTTprotected SocketFactoryprotected SuppressLog<Address> Log to suppress identical warnings for messages from members in different clustersprotected SuppressLog<Address> Log to suppress identical warnings for messages from members with different (incompatible) versionsprotected longprotected longprotected ThreadFactoryprotected Stringprotected ThreadPoolprotected TimeServiceprotected longprotected TimeSchedulerprotected booleanprotected booleanprotected booleanprotected Viewprotected ExpiryCache<Address> Cache keeping track of WHO_HAS requests for physical addresses (given a logical address) and expiring them after who_has_cache_timeout msprotected longFields inherited from class Protocol
after_creation_hook, down_prot, ergonomics, id, local_addr, log, policies, preview_warning, stack, stats, up_prot -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends TP>
T<T extends TP>
T<T extends TP>
Tstatic BundlercreateBundler(String type, Class<?> cl) defaultHeaders(boolean detailed) voidenableAllStats(boolean flag) <T extends TP>
TenableBlockingTimerTasks(boolean flag) voidenableStats(boolean flag) intintintintbooleanbooleanlongintlongstatic longDeprecated.longDeprecated.longDeprecated.longDeprecated.static intintlongDeprecated.longDeprecated.intgetRTT()Returns the SocketFactory associated with this protocol, if overridden in a subclass, or passes the call downlonglongSupposed to be overwritten by subclasses.getTimer()intlonglongbooleanbooleanbooleanisTrace()<T extends TP>
TisTrace(boolean i) boolean<T extends TP>
TlogDiscardMsgs(boolean l) boolean<T extends TP>
TlogDiscardMsgsVersion(boolean l) static String<T extends TP>
Tboolean<T extends TP>
TreceiveOnAllInterfaces(boolean r) <T extends TP>
Tvoidvoidprotected booleansameCluster(String req) <T extends TP>
T<T extends TP>
T<T extends TP>
T<T extends TP>
TsetBindPort(int port) <T extends TP>
TsetBindToAllInterfaces(boolean f) <T extends TP>
TsetBundler(Bundler new_bundler) <T extends TP>
T<T extends TP>
TsetDiagnosticsHandler(DiagnosticsHandler handler) Sets aDiagnosticsHandler.<T extends TP>
T<T extends TP>
TsetExternalPort(int e) <T extends Protocol>
TSets the level of a logger.<T extends TP>
TsetLocalTransport(String tp_class) <T extends TP>
T<T extends TP>
TsetLogDiscardMessages(boolean f) <T extends TP>
TsetLogDiscardMessagesVersion(boolean f) <T extends TP>
TsetLogicalAddrCacheExpiration(long l) <T extends TP>
TsetLogicalAddrCacheMaxSize(int l) <T extends TP>
T<T extends TP>
TsetMessageProcessingPolicy(String policy) <T extends TP>
T<T extends TP>
TsetPortRange(int range) voidSets a SocketFactory.<T extends TP>
T<T extends TP>
T<T extends TP>
TsetThreadFactory(ThreadFactory factory) <T extends TP>
TsetThreadPool(Executor thread_pool) <T extends TP>
TsetTimer(TimeScheduler timer) Sets a new timer.<T extends TP>
T<T extends TP>
TsetTimeServiceInterval(long t) <T extends TP>
TsetWhoHasCacheTimeout(long w) <T extends TP>
Tlong<T extends TP>
TunregisterProbeHandler(Class<? extends DiagnosticsHandler.ProbeHandler> cl) <T extends TP>
Tboolean<T extends TP>
TuseDirectMemory(boolean b) boolean<T extends TP>
TuseVirtualThreads(boolean f) view()Methods inherited from class Protocol
accept, addPolicy, addr, addr, afterCreationHook, destroy, down, down, down, getAddress, getComponents, getDownProtocol, getDownServices, getId, getIdsAbove, getLevel, getLog, getName, getPolicies, getProtocolStack, getTransport, getUpProtocol, getUpServices, getValue, init, isErgonomics, level, parse, policies, previewWarning, previewWarning, providedDownServices, providedUpServices, removePolicy, requiredDownServices, requiredUpServices, resetStatistics, setAddress, setDownProtocol, setErgonomics, setId, setPolicies, setProtocolStack, setUpProtocol, setValue, start, statsEnabled, stop, toString, up, up, up
-
Field Details
-
bind_addr
-
bind_port
protected int bind_portThe port to which the transport binds. 0 means to bind to any (ephemeral) port. See alsoport_range -
port_range
protected int port_range -
external_addr
-
external_port
protected int external_port -
receive_on_all_interfaces
protected boolean receive_on_all_interfaces -
receive_interfaces
-
logical_addr_cache_max_size
protected int logical_addr_cache_max_size -
logical_addr_cache_expiration
protected long logical_addr_cache_expiration -
logical_addr_cache_reaper_interval
protected long logical_addr_cache_reaper_interval -
message_processing_policy
-
local_transport_class
-
use_direct_memory
protected boolean use_direct_memory -
use_vthreads
protected boolean use_vthreads -
thread_naming_pattern
-
time_service_interval
protected long time_service_interval -
log_discard_msgs
protected boolean log_discard_msgsWhether warnings about messages from different groups are logged - private flag, not for common use -
log_discard_msgs_version
protected boolean log_discard_msgs_version -
who_has_cache_timeout
protected long who_has_cache_timeout -
suppress_time_different_version_warnings
protected long suppress_time_different_version_warnings -
suppress_time_different_cluster_warnings
protected long suppress_time_different_cluster_warnings -
bundler_type
-
timer_handle_non_blocking_tasks
protected boolean timer_handle_non_blocking_tasks -
cluster_name
-
is_trace
protected boolean is_trace -
local_physical_addr
-
view
-
members
-
connectLock
-
thread_factory
-
timer
-
time_service
-
socket_factory
-
header
-
who_has_cache
Cache keeping track of WHO_HAS requests for physical addresses (given a logical address) and expiring them after who_has_cache_timeout ms -
suppress_log_different_version
Log to suppress identical warnings for messages from members with different (incompatible) versions -
suppress_log_different_cluster
Log to suppress identical warnings for messages from members in different clusters -
last_discovery_request
protected long last_discovery_request -
logical_addr_cache
Maintains mappings between logical and physical addresses. When sending a message to a logical address, we look up the physical address from logical_addr_cache and send the message to the physical address
The keys are logical addresses, the values physical addresses -
logical_addr_cache_reaper
-
msg_stats
-
bundler
-
thread_pool
-
async_executor
-
msg_processing_policy
-
local_transport
-
diag_handler
-
rtt
-
print_function
protected static final LazyRemovalCache.Printable<Address, LazyRemovalCache.Entry<PhysicalAddress>> print_function
-
-
Constructor Details
-
TPConfig
public TPConfig()
-
-
Method Details
-
getBindAddr
-
setBindAddr
-
getBindAddress
-
setBindAddress
-
getBindPort
public int getBindPort() -
setBindPort
-
setPortRange
-
getPortRange
public int getPortRange() -
getExternalAddr
-
setExternalAddr
-
getExternalPort
public int getExternalPort() -
setExternalPort
-
receiveOnAllInterfaces
public boolean receiveOnAllInterfaces() -
receiveOnAllInterfaces
-
setBindToAllInterfaces
-
isReceiveOnAllInterfaces
public boolean isReceiveOnAllInterfaces() -
getReceiveInterfaces
-
getLogicalAddrCacheMaxSize
public int getLogicalAddrCacheMaxSize() -
setLogicalAddrCacheMaxSize
-
getLogicalAddrCacheExpiration
public long getLogicalAddrCacheExpiration() -
setLogicalAddrCacheExpiration
-
getLogicalAddrCacheReaperInterval
public long getLogicalAddrCacheReaperInterval() -
setLogicalAddrCacheReaperInterval
-
useDirectMemory
public boolean useDirectMemory() -
useDirectMemory
-
useVirtualThreads
-
useVirtualThreads
public boolean useVirtualThreads() -
getThreadNamingPattern
-
threadNamingPattern
-
getTimeServiceInterval
public long getTimeServiceInterval() -
setTimeServiceInterval
-
logDiscardMsgs
public boolean logDiscardMsgs() -
logDiscardMsgs
-
logDiscardMsgsVersion
public boolean logDiscardMsgsVersion() -
logDiscardMsgsVersion
-
setLogDiscardMessages
-
getLogDiscardMessages
public boolean getLogDiscardMessages() -
setLogDiscardMessagesVersion
-
getLogDiscardMessagesVersion
public boolean getLogDiscardMessagesVersion() -
getWhoHasCacheTimeout
public long getWhoHasCacheTimeout() -
setWhoHasCacheTimeout
-
getSuppressTimeDifferentVersionWarnings
public long getSuppressTimeDifferentVersionWarnings() -
setSuppressTimeDifferentVersionWarnings
-
getSuppressTimeDifferentClusterWarnings
public long getSuppressTimeDifferentClusterWarnings() -
setSuppressTimeDifferentClusterWarnings
-
getBundlerType
-
setBundlerType
-
isTrace
public boolean isTrace() -
isTrace
-
getMessageStats
-
setMessageStats
-
enableStats
public void enableStats(boolean flag) - Overrides:
enableStatsin classProtocol
-
localPhysicalAddress
-
getLocalPhysicalAddress
-
view
-
getThreadPool
-
getAsyncExecutor
-
setAsyncExecutor
-
getThreadFactory
Description copied from class:ProtocolSupposed to be overwritten by subclasses. Usually the transport returns a valid non-null thread factory, but thread factories can also be created by individual protocols- Overrides:
getThreadFactoryin classProtocol- Returns:
-
getTimer
-
getNumTimerTasks
public int getNumTimerTasks() -
getTimerThreads
public int getTimerThreads() -
dumpTimerTasks
-
getTimerClass
-
removeCancelledTimerTasks
public void removeCancelledTimerTasks() -
getTimeService
-
timestamp
public long timestamp() -
getSocketFactory
Description copied from class:ProtocolReturns the SocketFactory associated with this protocol, if overridden in a subclass, or passes the call down- Overrides:
getSocketFactoryin classProtocol- Returns:
- SocketFactory
-
setSocketFactory
Description copied from class:ProtocolSets a SocketFactory. Socket factories are typically provided by the transport (TP)- Overrides:
setSocketFactoryin classProtocol- Parameters:
f-
-
getBundler
-
getBundlerClass
-
clusterName
-
getClusterName
-
getClusterNameAscii
-
getMessageProcessingPolicy
-
msgProcessingPolicy
-
msgProcessingPolicy
-
getLocalTransport
-
getDiagnosticsHandler
-
getRTT
-
printWhoHasCache
-
getLogicalAddressCache
-
printLogicalAddressCache
-
getNumThreads
public static int getNumThreads() -
setThreadPool
-
setThreadFactory
-
setTimer
Sets a new timer. This should be done before the transport is initialized; be very careful, as replacing a running timer with tasks in it can wreak havoc !- Parameters:
timer-
-
setTimeService
-
setBundler
-
bundler
-
createBundler
-
setMessageProcessingPolicy
-
setLocalTransport
-
setLocalTransport
-
setDiagnosticsHandler
Sets aDiagnosticsHandler. Should be set before the stack is started- Throws:
Exception
-
createDiagnosticsHandler
-
registerProbeHandler
-
unregisterProbeHandler
-
unregisterProbeHandler
-
setLevel
Description copied from class:ProtocolSets the level of a logger. This method is used to dynamically change the logging level of a running system, e.g. via JMX. The appender of a level needs to exist. -
loggerType
-
enableAllStats
public void enableAllStats(boolean flag) -
resetStats
public void resetStats()- Overrides:
resetStatsin classProtocol
-
isLogicalAddressCacheReaperRunning
public boolean isLogicalAddressCacheReaperRunning() -
enableBlockingTimerTasks
-
getDifferentClusterMessages
public int getDifferentClusterMessages() -
getDifferentVersionMessages
public int getDifferentVersionMessages() -
clearDifferentClusterCache
-
clearDifferentVersionCache
-
defaultHeaders
-
sameCluster
-
getNumRejectedMsgs
Deprecated.Don't remove! https://issues.redhat.com/browse/JGRP-2814 -
getNumberOfThreadDumps
Deprecated.Don't remove! https://issues.redhat.com/browse/JGRP-2814 -
getNumUcastMsgsSent
Deprecated.Don't remove! https://issues.redhat.com/browse/JGRP-2814 -
getNumMcastMsgsSent
Deprecated.Don't remove! https://issues.redhat.com/browse/JGRP-2814 -
getNumUcastMsgsReceived
Deprecated.Don't remove! https://issues.redhat.com/browse/JGRP-2814 -
getNumMcastMsgsReceived
Deprecated.Don't remove! https://issues.redhat.com/browse/JGRP-2814
-