Exemplo n.º 1
0
 @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();
   }
 }
Exemplo n.º 2
0
 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);
 }
Exemplo n.º 4
0
 @Override
 public void onOutOfMemory(OutOfMemoryError oom) {
   OutOfMemoryErrorDispatcher.onOutOfMemory(oom);
 }