public class DeleteCallbackI
extends java.lang.Object
DeleteHandlePrx
will return true on
DeleteHandlePrx.finished()
. The block(long)
method will wait
the given number of milliseconds and then return the number of errors if any
or null if the delete is not yet complete.
Example usage:
DeleteCallbackI cb = new DeleteCallbackI(client, handle); Integer errors = null; while (errors == null) { errors = cb.block(500); }
修飾子とタイプ | フィールドと説明 |
---|---|
protected omero.api.delete.DeleteHandlePrx |
handle
Proxy passed to this instance on creation.
|
コンストラクタと説明 |
---|
DeleteCallbackI(client client,
omero.api.delete.DeleteHandlePrx handle) |
修飾子とタイプ | メソッドと説明 |
---|---|
java.lang.Integer |
block(long ms)
Should only be used if the default logic of the process methods is kept
in place.
|
void |
close() |
void |
finished(int errors)
Client method to be overwritten when block is returning a non-null.
|
omero.api.delete.DeleteReport[] |
loop(int loops,
long ms)
Calls
block(long) "loops" number of times with the "ms"
argument. |
protected final omero.api.delete.DeleteHandlePrx handle
public DeleteCallbackI(client client, omero.api.delete.DeleteHandlePrx handle) throws omero.ServerError
omero.ServerError
public omero.api.delete.DeleteReport[] loop(int loops, long ms) throws omero.LockTimeout, omero.ServerError
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.loops
- Number of times to call block(long)
ms
- Number of milliseconds to pass to {@link #block(long)omero.LockTimeout
- if block(long)
does not return
a non-null value after loops calls.omero.ServerError
public java.lang.Integer block(long ms) throws java.lang.InterruptedException
ms
- java.lang.InterruptedException
public void finished(int errors)
public void close()