try {
String memberAddr = event.getMember().getInetSocketAddress().toString();
if (endpointOwners.containsKey(memberAddr)) {
synchronized (shutdownMutex) {
ILock lock = hazelcastInstance.getLock("EndpointOwners/" + memberAddr);
lock.lock();
try {
if (endpointOwners.containsKey(memberAddr)) {
Collection<String> keys = endpointOwners.remove(memberAddr);
for (Object k : keys) {
Endpoint endpoint = (Endpoint)endpointMap.remove(k);