@Override public void heartbeat() throws RemoteException { try { super.heartbeat(); checkMembers(false); } catch (Exception excp) { excp.printStackTrace(); } }
public void heartbeat() { try { long now = System.currentTimeMillis(); Map.Entry[] entries = (Map.Entry[]) messages.entrySet().toArray(new Map.Entry[messages.size()]); for (int i = 0; i < entries.length; i++) { MapEntry entry = (MapEntry) entries[i].getValue(); if (entry.expired(now, expire)) { if (log.isInfoEnabled()) log.info("Message [" + entry.id + "] has expired. Removing."); messages.remove(entry.id); } // end if } } catch (Exception x) { log.warn("Unable to perform heartbeat on the TwoPhaseCommit interceptor.", x); } finally { super.heartbeat(); } }
@Override public void heartbeat() { super.heartbeat(); checkMembers(false); }