public void invalidateScheduledActionsFor(Address endpoint, Set<Integer> threadIds) {
   if (!node.joined() || !node.isActive()) return;
   if (setScheduledActions.size() > 0) {
     Iterator<ScheduledAction> it = setScheduledActions.iterator();
     while (it.hasNext()) {
       ScheduledAction sa = it.next();
       Request request = sa.getRequest();
       if (endpoint.equals(request.caller) && threadIds.contains(request.lockThreadId)) {
         sa.setValid(false);
         it.remove();
       }
     }
   }
 }
 public void checkScheduledActions() {
   if (!node.joined() || !node.isActive()) return;
   if (setScheduledActions.size() > 0) {
     Iterator<ScheduledAction> it = setScheduledActions.iterator();
     while (it.hasNext()) {
       ScheduledAction sa = it.next();
       if (sa.expired() && sa.isValid()) {
         sa.onExpire();
         it.remove();
       } else if (!sa.isValid()) {
         it.remove();
       }
     }
   }
 }