twisted.internet.defer.DeferredFilesystemLock(lockfile.FilesystemLock) class documentationtwisted.internet.defer
(View In Hierarchy)
A FilesystemLock
that allows for a Deferred to be
fired when the lock is acquired.
| Method | __init__ | |
| Method | deferUntilLocked | Wait until we acquire this lock. This method is not safe for concurrent use. | 
| Instance Variable | _scheduler | The object in charge of scheduling retries. In this implementation this is parameterized for testing. | 
| Instance Variable | _interval | The retry interval for an IReactorTimebased scheduler. | 
| Instance Variable | _tryLockCall | A DelayedCallbased on_intervalthat will manage the next retry for 
acquiring the lock. | 
| Instance Variable | _timeoutCall | A DelayedCallbased ondeferUntilLocked's timeout argument.  This is in 
charge of timing out our attempt to acquire the lock. | 
Inherited from FilesystemLock:
| Instance Variable | name | The name of the file associated with this lock. | 
| Instance Variable | clean | Indicates whether this lock was released cleanly by its last owner.  Only 
meaningful after lockhas been called and returns True. | 
| Instance Variable | locked | Indicates whether the lock is currently held by this object. | 
| Method | lock | Acquire this lock. | 
| Method | unlock | Release this lock. | 
DelayedCall 
based on _interval that will manage the next retry for 
acquiring the lock.
  DelayedCall 
based on deferUntilLocked's timeout argument.  This is in 
charge of timing out our attempt to acquire the lock.
  | Parameters | name | The name of the lock to acquire | 
| scheduler | An object which provides IReactorTime | 
Wait until we acquire this lock. This method is not safe for concurrent use.
| Parameters | timeout | the number of seconds after which to time out if the lock has not been 
acquired. (type: floatorint) | 
| Returns | a Deferredwhich will callback when the lock is acquired, or errback with aTimeoutErrorafter timing out or anAlreadyTryingToLockErrorif thedeferUntilLockedhas already been called and not successfully locked the file. | |