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