@Override
    public boolean shouldSchedule(Queue.Task p, List<Action> actions) {
        Item item = Tasks.getItemOf(p);
        if (item != null) {
            lock.readLock().lock();
            try {
                return !_contains(item);
            } finally {
                lock.readLock().unlock();
            }
        }
        return true;
    }
@ Override public boolean shouldSchedule ( Queue . Task p , List < Action > actions ) { Item item = Tasks . getItemOf ( p ) ; if ( item != null ) { lock . readLock ( ) . lock ( ) ; try { return ! _contains ( item ) ; } finally { lock . readLock ( ) . unlock ( ) ; } } return true ; }
{@inheritDoc}