|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atomikos.icatch.tcc.UserTccServiceManager
public class UserTccServiceManager
Constructor Summary | |
---|---|
UserTccServiceManager()
|
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. |
protected static void |
doDeregister(TccService app)
Deregisters a previously registered application TccService. |
protected static void |
doRegisterForRecovery(TccService app)
Initializes the registry with an application-level service implementation. |
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 |
setAutoStartup(boolean autoStartup)
Sets the autoStartup mode. |
void |
suspend(String id)
Suspends the association of the calling thread with the work in question. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UserTccServiceManager()
Method Detail |
---|
protected static void doRegisterForRecovery(TccService app)
app
- protected static void doDeregister(TccService app)
app
- public void setAutoStartup(boolean autoStartup)
autoStartup
- public String register(TccService service, long timeout)
TccServiceManager
IMPORTANT:
register
in interface TccServiceManager
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).
public void completed(String id)
TccServiceManager
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.
completed
in interface TccServiceManager
id
- Correlation id of the work
as obtained during register (used to
check if the work is not timed out).public void failed(String id)
TccServiceManager
failed
in interface TccServiceManager
id
- Correlation id of the work
as obtained during register (used to check if the
work has not timed out).public void suspend(String id)
TccServiceManager
suspend
in interface TccServiceManager
id
- Correlation id of the work
as obtained during register.public void resume(String id)
TccServiceManager
resume
in interface TccServiceManager
id
- Correlation id of the work
as obtained during register.public void registerForRecovery(TccService service)
TccServiceManager
registerForRecovery
in interface TccServiceManager
public void deregisterForRecovery(TccService service)
TccServiceManager
deregisterForRecovery
in interface TccServiceManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |