Package pike :: Module model :: Class Lease
[hide private]
[frames] | no frames]

Class Lease

source code

object --+
         |
        Lease

Instance Methods [hide private]
 
__init__(self, tree)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
update(self, lease_res) source code
 
arm_future(self)
(Re)arm the lease future for this Lease.
source code
 
ref(self) source code
 
dispose(self) source code
 
on_break(self, cb)
Simple lease break callback handler.
source code
 
on_break_request(self, cb, cb_ctx=None)
Complex lease break callback handler.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, tree)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

arm_future(self)

source code 

(Re)arm the lease future for this Lease. This function should be called when a lease changes state to anything other than SMB2_LEASE_NONE

on_break(self, cb)

source code 

Simple lease break callback handler.

Parameters:
  • cb - callable taking 1 parameter: the break request lease state should return the desired lease state to break to

on_break_request(self, cb, cb_ctx=None)

source code 

Complex lease break callback handler.
@param cb: callable taking 3 parameters:
                L{Lease}
                L{Smb2} containing the break request
                L{object} arbitrary context
           should handle breaking the lease in some way
           callback is also responsible for re-arming the future
           and updating the lease_state (if changed)