private void AddLock(ResourceType resourceType, long resourceId, bool exclusive) { LockUnit lockUnit = new LockUnit(resourceType, resourceId, exclusive); MutableInt lockCount = _locks.computeIfAbsent(lockUnit, k => new MutableInt()); lockCount.increment(); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldCloseAll() public virtual void ShouldCloseAll() { // given InstanceSelector <string> selector = SelectorFilledWithOrdinal(); // when MutableInt count = new MutableInt(); selector.Close(s => count.increment()); // then assertEquals(Enum.GetValues(typeof(IndexSlot)).length, count.intValue()); }
internal virtual void RadixOverflow(long val) { long shiftVal = (val & ~RadixCalculator.LENGTH_BITS) >> (RadixCalculator.RADIX_BITS - 1 + RadixShift.intValue()); if (shiftVal > 0) { while (shiftVal > 0) { RadixShift.increment(); CompressRadixIndex(); shiftVal = shiftVal >> 1; } } }
public override System.Collections.IEnumerable Expand(Path path, BranchState state) { NodesVisited.increment(); return(Delegate.expand(path, state)); }