EmbeddedCacheManager cacheManager = cache.getCacheManager();
if (cacheManager.getCoordinator() instanceof JGroupsAddress
&& cacheManager.getTransport() instanceof JGroupsTransport)
{
JGroupsTransport transport = (JGroupsTransport)cacheManager.getTransport();
// Coordinator's address
org.jgroups.Address jgAddress = ((JGroupsAddress)cacheManager.getCoordinator()).getJGroupsAddress();
// if jgAddress is UUID address, not the physical one, then retrieve via channel
if (!(jgAddress instanceof IpAddress))
{
// this is the only way of getting physical address.
Channel channel = transport.getChannel();
jgAddress = (org.jgroups.Address)channel.down(new Event(Event.GET_PHYSICAL_ADDRESS, jgAddress));
}
if (jgAddress instanceof IpAddress)
{
String address = ((IpAddress)jgAddress).getIpAddress().getHostAddress();