@SuppressWarnings("WhileLoopSpinsOnField")
 @Override
 public void run() {
   try {
     while (running) {
       try {
         final JoinMessage joinMessage = receive();
         if (joinMessage != null) {
           for (MulticastListener multicastListener : listeners) {
             try {
               multicastListener.onMessage(joinMessage);
             } catch (Exception e) {
               logger.warning(e);
             }
           }
         }
       } catch (OutOfMemoryError e) {
         OutOfMemoryErrorDispatcher.onOutOfMemory(e);
       } catch (Exception e) {
         logger.warning(e);
       }
     }
   } finally {
     cleanup();
   }
 }
 public void run() {
   try {
     doRun();
   } catch (OutOfMemoryError e) {
     onOutOfMemory(e);
   } catch (Throwable t) {
     logger.severe(t);
   }
 }
 private void handleException(Throwable e) {
   if (e instanceof OutOfMemoryError) {
     OutOfMemoryErrorDispatcher.onOutOfMemory((OutOfMemoryError) e);
     return;
   }
   if (e instanceof HazelcastSerializationException) {
     throw (HazelcastSerializationException) e;
   }
   throw new HazelcastSerializationException(e);
 }
 @Override
 public void onOutOfMemory(OutOfMemoryError oom) {
   OutOfMemoryErrorDispatcher.onOutOfMemory(oom);
 }