public lockableOwnership(string bladeIP, bladeLockType readLocks, bladeLockType writeLocks)
        {
            IPAddress       = bladeIP;
            _readLocks      = readLocks;
            _writeLocks     = writeLocks;
            specOwnership   = null;
            allocationStack = Environment.StackTrace;

            acquire();
        }
        public void setSpec(bladeOwnership newSpec)
        {
            if (specOwnership != null)
            {
                throw new Exception();
            }

            if (newSpec.kernelDebugAddress != IPAddress)
            {
                throw new Exception();
            }

            if (newSpec.permittedAccessRead != _readLocks ||
                newSpec.permittedAccessWrite != _writeLocks)
            {
                throw new Exception();
            }

            specOwnership = newSpec;
        }
Exemplo n.º 3
0
 public void addNode(bladeOwnership spec)
 {
     spec.createOrUpdateInDB();
 }