com.sun.sgs.profile
Interface ProfileParticipantDetail


public interface ProfileParticipantDetail

Details final profile state associated with a single participant of a transaction.


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.
 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.
 

Method Detail

getParticipantName

String getParticipantName()
Returns the name of this participant.

Returns:
the participant's name

wasPrepared

boolean wasPrepared()
Returns whether this participant finished preparing to commit at the conclusion of the transaction.

Returns:
true if this participant finished preparing, false otherwise

wasReadOnly

boolean wasReadOnly()
Returns the vote that the participant returned from preparation. If wasPrepared is false, then this method's return value has no meaning and will always return false.

Returns:
true if the participant returned from preparation with a vote of read-only, false otherwise

wasCommitted

boolean wasCommitted()
Returns whether this participant was successfully committed.

Returns:
true if this participant committed, false otherwise

wasCommittedDirectly

boolean wasCommittedDirectly()
Returns whether this participant was called to prepare and commit in one step (via 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.

Returns:
true if this participant was called directly to commit, false otherwise

getPrepareTime

long getPrepareTime()
Returns the length of time this participant spent preparing to commit, regardless of whether preparation succeeded. If this participant was called to commit directly, then this is the time it took both to prepare to commit and to commit.

Returns:
the time in milliseconds this participant spent preparing to commit, or the time spent preparing and committing if called directly to commit

getCommitTime

long getCommitTime()
Returns the length of time this participant spent committing. If the participant failed in preparing to commit, or if the transaction was aborted and therefore this participant never committed, then this method will always return 0. If this participant was called to commit directly, then this is the time it took both to prepare to commit and to commit.

Returns:
the time in milliseconds this participant spent committing, or the time spent preparing and committing if called directly to commit

getAbortTime

long getAbortTime()
Returns the length of time this participant spent aborting if the transaction failed to commit. If the transaction committed, then this method will always return 0.

Returns:
the time in milliseconds this participant spent aborting

RedDwarf, Version 0.10.1
2010-03-14 10:56:12

Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved