Exemple #1
0
 public RedLockExtend(
     IRedLockExtensibleSynchronizationPrimitive primitive,
     Dictionary <IDatabase, Task <bool> > tryAcquireOrRenewTasks,
     CancellationToken cancellationToken)
 {
     this._primitive = primitive;
     this._tryAcquireOrRenewTasks = tryAcquireOrRenewTasks;
     this._cancellationToken      = cancellationToken;
 }
Exemple #2
0
 public RedLockHandle(
     IRedLockExtensibleSynchronizationPrimitive primitive,
     Dictionary <IDatabase, Task <bool> > tryAcquireTasks,
     TimeoutValue extensionCadence,
     TimeoutValue expiry)
 {
     this._primitive        = primitive;
     this._tryAcquireTasks  = tryAcquireTasks;
     this._extensionCadence = extensionCadence;
     this._expiry           = expiry;
     // important to set this last, since the monitor constructor will read other fields of this
     this._monitor = new LeaseMonitor(this);
 }