@Override
    public final boolean retainAll(Collection<?> c) {
        this.writeLock.lock();
        try {
            int newSize = 0;
            for (final Queue<T> queue : this.keyedQueues.values()) {
                queue.retainAll(c);
                newSize += queue.size();
            }

            // Update the queue size
            final int oldSize = this.size;
            this.size = newSize;

            // If the updated size and old size differ things changed
            return this.size != oldSize;
        } finally {
            this.writeLock.unlock();
        }
    }
@ Override public final boolean retainAll ( Collection < ? > c ) { this . writeLock . lock ( ) ; try { int newSize = 0 ; for ( final Queue < T > queue : this . keyedQueues . values ( ) ) { queue . retainAll ( c ) ; newSize += queue . size ( ) ; } final int oldSize = this . size ; this . size = newSize ; return this . size != oldSize ; } finally { this . writeLock . unlock ( ) ; } }
/* (non-Javadoc)
@see java.util.Collection#retainAll(java.util.Collection)