|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.sgs.impl.service.transaction.ProfileParticipantDetailImpl
class ProfileParticipantDetailImpl
Simple implementation of ProfileParticipantDetail that
is package-private and used by TransactionImpl to report
detail associated with each participant.
| Constructor Summary | |
|---|---|
ProfileParticipantDetailImpl(String participantName)
Creates an instance of ProfileParticipantDetailImpl for
the given named participant. |
|
| Method Summary | |
|---|---|
long |
getAbortTime()
Returns the length of time this participant spent aborting if the transaction failed to commit. |
long |
getCommitTime()
Returns the length of time this participant spent committing. |
String |
getParticipantName()
Returns the name of this participant. |
long |
getPrepareTime()
Returns the length of time this participant spent preparing to commit, regardless of whether preparation succeeded. |
(package private) void |
setAborted(long time)
Sets the detail as associated with a participant that has been aborted. |
(package private) void |
setCommitted(long time)
Sets the detail as associated with a participant that has been committed successfully. |
(package private) void |
setCommittedDirectly(long time)
Sets the detail as associated with a participant that has been directly committed successfully. |
(package private) void |
setPrepared(long time,
boolean readOnlyParticipant)
Sets the detail as associated with a participant that has been prepared successfully. |
boolean |
wasCommitted()
Returns whether this participant was successfully committed. |
boolean |
wasCommittedDirectly()
Returns whether this participant was called to prepare and commit in one step (via TransactionParticipant.prepareAndCommit). |
boolean |
wasPrepared()
Returns whether this participant finished preparing to commit at the conclusion of the transaction. |
boolean |
wasReadOnly()
Returns the vote that the participant returned from preparation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
ProfileParticipantDetailImpl(String participantName)
ProfileParticipantDetailImpl for
the given named participant.
participantName - the name of the participant associated with
this detail| Method Detail |
|---|
public String getParticipantName()
getParticipantName in interface ProfileParticipantDetailpublic boolean wasPrepared()
wasPrepared in interface ProfileParticipantDetailtrue if this participant finished preparing,
false otherwisepublic boolean wasReadOnly()
wasPrepared is false, then this method's
return value has no meaning and will always return false.
wasReadOnly in interface ProfileParticipantDetailtrue if the participant returned from preparation
with a vote of read-only, false otherwisepublic boolean wasCommitted()
wasCommitted in interface ProfileParticipantDetailtrue if this participant committed,
false otherwisepublic boolean wasCommittedDirectly()
TransactionParticipant.prepareAndCommit).
If this returns true then both getPrepareTime
and getCommitTime will return the same value, as they
represent the same work. If the return from wasCommitted
is false then the call to prepareAndCommit
failed.
wasCommittedDirectly in interface ProfileParticipantDetailtrue if this participant was called directly to
commit, false otherwisepublic long getPrepareTime()
getPrepareTime in interface ProfileParticipantDetailpublic long getCommitTime()
getCommitTime in interface ProfileParticipantDetailpublic long getAbortTime()
getAbortTime in interface ProfileParticipantDetail
void setPrepared(long time,
boolean readOnlyParticipant)
readOnlyParticipant is
true then none of the other mutator methods should
be called after calling setPrepared.
time - the time in milliseconds that the participant spent
preparingreadOnlyParticipant - whether preparation ended with the
participant voting read-onlyvoid setCommitted(long time)
setCommitted.
time - the time in milliseconds that the participant spent
committingvoid setCommittedDirectly(long time)
setCommittedDirectly.
time - the time in milliseconds that the participant spent
preparing and committingvoid setAborted(long time)
setAborted.
time - the time in milliseconds that the participant spent
aborting
|
RedDwarf, Version 0.10.1 2010-03-14 10:56:12 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||