|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RecoverableResource
A Recoverable Resource is the abstraction of a resource that supports recoverable work (i.e., that supports Participant instances). Its primary use is for Participant instances that are not self-containing, as for instance in XA transactions (where the Participant can not contain the entire transaction context of the server, but only an external reference to it in the form of an Xid instance). A recoverable resource is invoked at recovery time by its own Participant instances (typically in the readExternal method), who iteratively ask each resource in the com.atomikos.icatch.Configuration whether or not they can be recovered by them. At the end of recovery, the TM will invoke the endRecovery method, to indicate to the resource that whatever private logs it has, any remaining and non-recovered participants should be aborted.
Method Summary | |
---|---|
void |
close()
Close the resource for shutdown. |
void |
endRecovery()
Notify the resource that recovery is ended. |
String |
getName()
Get the name of the resource. |
boolean |
isClosed()
Test if the resource is closed. |
boolean |
isSameRM(RecoverableResource res)
Test if a resource is the same as another one. |
boolean |
recover(Participant participant)
Recover the partially reconstructed Participant. |
void |
setRecoveryService(RecoveryService recoveryService)
Initialize this resource with the recovery service. |
Method Detail |
---|
void setRecoveryService(RecoveryService recoveryService) throws ResourceException
recoveryService
- The recovery service. This instance
can be used by the resource to ask recovery from the
transaction engine.
ResourceException
- On errors.boolean recover(Participant participant) throws ResourceException
participant
- A partially recovered Participant.
ResourceException
- On failure.void endRecovery() throws ResourceException
ResourceException
- On failure.void close() throws ResourceException
ResourceException
String getName()
boolean isSameRM(RecoverableResource res) throws ResourceException
ResourceException
boolean isClosed()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |