20 namespace Deveel.Data.Transactions {
38 private bool WasChecked {
get; set; }
41 get {
return Queue.Lockable; }
48 while (exclusiveMode) {
57 while (sharedAccess > 0) {
65 throw new InvalidOperationException(
"Invalid mode");
73 exclusiveMode =
false;
74 Monitor.PulseAll(
this);
77 if (sharedAccess == 0 && exclusiveMode) {
78 Monitor.PulseAll(
this);
79 }
else if (sharedAccess < 0) {
81 Monitor.PulseAll(
this);
82 throw new Exception(
"Too many 'Sahred Locks Release' calls");
85 throw new InvalidOperationException(
"Invalid mode");
104 throw new InvalidOperationException(
"Access error on Lock: Tried to Write to a non Write Lock.");
107 Queue.CheckAccess(
this);
LockingMode
The mode applied to a lock over a resource during a transaction.
Lock(LockingQueue queue, LockingMode mode, AccessType accessType)
void CheckAccess(AccessType accessType)