Package omero :: Module callbacks :: Class DeleteCallbackI
[hide private]
[frames] | no frames]

Class DeleteCallbackI

source code



Callback used for waiting until DeleteHandlePrx will return true on
finished(). The block(long) method will wait the given number of
milliseconds and then return the number of errors if any or None
if the delete is not yet complete.

Example usage:

    cb = DeleteCallbackI(client, handle)
    errors = None
    while (errors is None):
        errors = cb.block(500)

Instance Methods [hide private]
 
__init__(self, adapter_or_client, handle, poll=True)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
loop(self, loops, ms)
Calls block(long) "loops" number of times with the "ms" argument.
source code
 
block(self, ms)
Should only be used if the default logic of the handle methods is kept in place.
source code
 
finished(self, errors) source code
 
close(self) 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, adapter_or_client, handle, poll=True)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

loop(self, loops, ms)

source code 

Calls block(long) "loops" number of times with the "ms" argument. This means the total wait time for the delete to occur is: loops X ms. Sensible values might be 10 loops for 500 ms, or 5 seconds.

@param loops Number of times to call block(long) @param ms Number of milliseconds to pass to block(long @throws omero.LockTimeout if block(long) does not return a non-null value after loops calls.

block(self, ms)

source code 

Should only be used if the default logic of the handle methods is kept in place. If "event.set" does not get called, this method will always block for the given milliseconds.