Ejemplo n.º 1
0
 public void retainAllUsers(Collection<String> users) {
   Lock lock = xLock.writeLock();
   lock.lock();
   try {
     X.removeAll(new NotContainsPredicate<>(users));
   } finally {
     lock.unlock();
   }
 }
Ejemplo n.º 2
0
 public void retainAllItems(Collection<String> items) {
   Lock lock = yLock.writeLock();
   lock.lock();
   try {
     Y.removeAll(new NotContainsPredicate<>(items));
   } finally {
     lock.unlock();
   }
 }