Exemple #1
0
        private LockWaitEvent WaitForLock(bool exclusive, ResourceType resourceType, long[] resourceIds)
        {
            WaitingOnLockEvent @event = new WaitingOnLockEvent(exclusive ? Org.Neo4j.Kernel.impl.locking.ActiveLock_Fields.EXCLUSIVE_MODE : Org.Neo4j.Kernel.impl.locking.ActiveLock_Fields.SHARED_MODE, resourceType, resourceIds, this, _clock.nanos(), _status);

            _status = @event;
            return(@event);
        }
Exemple #2
0
 internal virtual void DoneWaitingOnLock(WaitingOnLockEvent waiting)
 {
     if (_status != waiting)
     {
         return;                         // already closed
     }
     _waitTime.addAndGet(this, waiting.WaitTimeNanos(_clock.nanos()));
     _status = waiting.PreviousStatus();
 }