public void cancelAll(UUID callerUuid, Throwable cause) {
        for (WaitSetEntry entry : queue) {
            if (!entry.isValid()) {
                continue;
            }
            Operation op = entry.getOperation();
            if (callerUuid.equals(op.getCallerUuid())) {
                entry.cancel(cause);
            }
        }
    }
@Test
    public void cancelAll() {
        WaitSet waitSet = newWaitSet();

        BlockedOperation op1 = newBlockingOperationWithServiceNameAndObjectId("service1", "1");
        waitSet.park(op1);
        BlockedOperation op2 = newBlockingOperationWithServiceNameAndObjectId("service1", "2");
        waitSet.park(op2);
        BlockedOperation op3 = newBlockingOperationWithServiceNameAndObjectId("service2", "1");
        waitSet.park(op3);

        Exception cause = new Exception();
        waitSet.cancelAll("foo", "1", cause);

        assertCancelled(waitSet, op1, cause);
        assertCancelled(waitSet, op2, null);
        assertCancelled(waitSet, op3, null);
    }