예제 #1
0
        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();
        }
예제 #2
0
//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());
        }
예제 #3
0
            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;
                    }
                }
            }
예제 #4
0
 public override System.Collections.IEnumerable Expand(Path path, BranchState state)
 {
     NodesVisited.increment();
     return(Delegate.expand(path, state));
 }