|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectomero.grid.DeleteCallbackI
public class DeleteCallbackI
Callback used for waiting until 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); }
Field Summary | |
---|---|
protected omero.api.delete.DeleteHandlePrx |
handle
Proxy passed to this instance on creation. |
Constructor Summary | |
---|---|
DeleteCallbackI(client client,
omero.api.delete.DeleteHandlePrx handle)
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final omero.api.delete.DeleteHandlePrx handle
Constructor Detail |
---|
public DeleteCallbackI(client client, omero.api.delete.DeleteHandlePrx handle) throws omero.ServerError
omero.ServerError
Method Detail |
---|
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 Integer block(long ms) throws InterruptedException
ms
-
InterruptedException
public void finished(int errors)
public void close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Version: 4.3.4-dbcbce5a-b4
Copyright © 2009 The University of Dundee. All Rights Reserved.