Пример #1
0
 private static IntObjectProcedure <LongObjectMap <LockResource> > CollectActiveLocks(IList <ActiveLock> locks, Org.Neo4j.Kernel.impl.locking.ActiveLock_Factory activeLock)
 {
     return((typeId, exclusive) =>
     {
         ResourceType resourceType = ResourceTypes.fromId(typeId);
         exclusive.forEachKeyValue((resourceId, @lock) =>
         {
             locks.Add(activeLock.Create(resourceType, resourceId));
         });
     });
 }
Пример #2
0
 private static void CollectActiveLocks(LongIntMap[] counts, IList <ActiveLock> locks, Org.Neo4j.Kernel.impl.locking.ActiveLock_Factory activeLock)
 {
     for (int typeId = 0; typeId < Counts.Length; typeId++)
     {
         LongIntMap lockCounts = counts[typeId];
         if (lockCounts != null)
         {
             ResourceType resourceType = ResourceTypes.fromId(typeId);
             lockCounts.forEachKeyValue((resourceId, count) => locks.Add(activeLock.Create(resourceType, resourceId)));
         }
     }
 }