private static int lockLists(List<WeakList<?>> lists) { int version = 0; for (WeakList<?> list : lists) { version += list.lock(); } return version; }
private static void unlockLists(List<WeakList<?>> lists) { for (WeakList<?> list : lists) { list.unlock(); } }