private void expireStalledBlockedMessages() { synchronized (lock) { Iterator<BlockedMessage> each = blockedQ.iterator(); while (each.hasNext()) { if (each.next().notifyIfExpired()) { each.remove(); } } } }
boolean sendOrExpire() { if ( ! notifyIfExpired() ) { Result res = sendInternal(msg); if ( ! isSendQFull(res) ) { notifyComplete(res); } else { return false; } } return true; }