Search in sources :

Example 1 with LongIntMap

use of org.eclipse.collections.api.map.primitive.LongIntMap in project neo4j by neo4j.

the class ForsetiClient method collectActiveLocks.

private static void collectActiveLocks(LongIntMap[] counts, List<ActiveLock> locks, LockType lockType, long userTransactionId) {
    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(new ActiveLock(resourceType, lockType, userTransactionId, resourceId)));
        }
    }
}
Also used : ActiveLock(org.neo4j.lock.ActiveLock) ResourceType(org.neo4j.lock.ResourceType) LongIntMap(org.eclipse.collections.api.map.primitive.LongIntMap)

Aggregations

LongIntMap (org.eclipse.collections.api.map.primitive.LongIntMap)1 ActiveLock (org.neo4j.lock.ActiveLock)1 ResourceType (org.neo4j.lock.ResourceType)1