Get route to be used as the identifier for sticky session. Return null if I am not able to find the appropriate route (or in case of local mode)
144 if (cache.getCacheConfiguration().clustering().cacheMode().isClustered() &&
isGeneratedNodeName) {
145 logger.warn(
"Clustered configuration used, but node name is not properly set. Make sure to start server with jboss.node.name property identifying cluster node");
156 if (address == null || (address == LocalModeAddress.INSTANCE)) {
161 String name = NameCache.get(jgroupsAddress);
166 Transport transport = cache.getCacheManager().getTransport();
167 JChannel jgroupsChannel = ((JGroupsTransport) transport).getChannel();
169 IpAddress ipAddress = (IpAddress) jgroupsChannel.down(
new Event(Event.GET_PHYSICAL_ADDRESS, jgroupsAddress));
171 InetSocketAddress socketAddress = (ipAddress != null) ?
new InetSocketAddress(ipAddress.getIpAddress(), ipAddress.getPort()) :
new InetSocketAddress(0);
172 name = String.format(
"%s:%s", socketAddress.getHostString(), socketAddress.getPort());
174 logger.debugf(
"Address not found in NameCache. Fallback to %s", name);
static org.jgroups.Address toJGroupsAddress(Address address)
Definition: TopologyInfo.java:192
static final Logger logger
Definition: TopologyInfo.java:45
final boolean isGeneratedNodeName
Definition: TopologyInfo.java:55
final String myNodeName
Definition: TopologyInfo.java:50
Address getOwnerAddress(Cache cache, Object key)
Definition: TopologyInfo.java:181