|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TccServiceManager
Method Summary | |
---|---|
void |
completed(String id)
Marks previously registered work as complete. |
void |
deregisterForRecovery(TccService service)
Deregisters a service for recovery (the inverse of registerForRecovery); this can be used to re-register later if desirable. |
void |
failed(String id)
Signals that the work has failed. |
String |
register(TccService service,
long timeout)
Registers the calling thread for new try-confirm-cancel work. |
void |
registerForRecovery(TccService service)
Registers a service for recovery. |
void |
resume(String id)
Resumes a previously suspended thread association. |
void |
suspend(String id)
Suspends the association of the calling thread with the work in question. |
Method Detail |
---|
void registerForRecovery(TccService service)
service
- void deregisterForRecovery(TccService service)
service
- String register(TccService service, long timeout)
IMPORTANT:
service
- The service implementation for which
registration is done (and that will receive the callbacks
for completion). If null then this method will merely
start a new activity (or subactivity depending on the context).timeout
- The timeout in milliseconds
before the work should be canceled automatically
by the system (this ensures that
pending work will eventually be canceled if it
is never confirmed).
void completed(String id)
If there was no pre-existing activity when the work was registered, then this method will also confirm the work everwhere (or cancel everywhere, if for instance orphans are detected or intermediate timeouts have occurred).
If there was a pre-existing activity then the work's confirmation will be subject to the termination of that pre-existing activity.
IMPORTANT: all the persistent results should be saved BEFORE this method is called. Otherwise, cancel callbacks may interleave with pending work, which involves a correctness risk. This method merely triggers completion and does not wait for the result; instead, the final result is obtained through one of cancel or confirm in the TccService instance.
id
- Correlation id of the work
as obtained during register (used to
check if the work is not timed out).void failed(String id)
id
- Correlation id of the work
as obtained during register (used to check if the
work has not timed out).void suspend(String id)
id
- Correlation id of the work
as obtained during register.void resume(String id)
id
- Correlation id of the work
as obtained during register.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |