Class ActivationRecord

java.lang.Object
com.arjuna.ats.arjuna.StateManager
com.arjuna.ats.arjuna.coordinator.AbstractRecord
com.arjuna.ats.internal.arjuna.abstractrecords.ActivationRecord
Direct Known Subclasses:
CadaverActivationRecord

public class ActivationRecord extends AbstractRecord
  • Constructor Details

    • ActivationRecord

      public ActivationRecord(int st, StateManager sm, BasicAction action)
    • ActivationRecord

      public ActivationRecord()
  • Method Details

    • typeIs

      public int typeIs()
      Specified by:
      typeIs in class AbstractRecord
      Returns:
      RecordType value.
    • value

      public Object value()
      Description copied from class: AbstractRecord
      If this abstract record caused a heuristic then it should return an object which implements HeuristicInformation
      Specified by:
      value in class AbstractRecord
      Returns:
      Object to be used to order.
    • setValue

      public void setValue(Object v)
      Specified by:
      setValue in class AbstractRecord
    • nestedAbort

      public int nestedAbort()
      nestedAbort causes the reset_state function of the object to be invoked passing it the saved ObjectStatus.
      Specified by:
      nestedAbort in class AbstractRecord
      Returns:
      TwoPhaseOutcome to indicate success/failure.
      See Also:
    • nestedCommit

      public int nestedCommit()
      nestedCommit does nothing since the passing of the state up to the parent action is handled by the record list merging system. In fact since nested_prepare returns PREPARE_READONLY this function should never actually be called.
      Specified by:
      nestedCommit in class AbstractRecord
      Returns:
      TwoPhaseOutcome to indicate success/failure.
      See Also:
    • nestedPrepare

      public int nestedPrepare()
      Description copied from class: AbstractRecord
      A prepare for a nested transaction has occurred.
      Specified by:
      nestedPrepare in class AbstractRecord
      Returns:
      TwoPhaseOutcome to indicate success/failure.
      See Also:
    • topLevelAbort

      public int topLevelAbort()
      topLevelAbort for Activation records is exactly like a nested abort.
      Specified by:
      topLevelAbort in class AbstractRecord
      Returns:
      TwoPhaseOutcome to indicate success/failure.
      See Also:
    • topLevelCommit

      public int topLevelCommit()
      Description copied from class: AbstractRecord
      A commit of a top-level transaction has occurred.
      Specified by:
      topLevelCommit in class AbstractRecord
      Returns:
      TwoPhaseOutcome to indicate success/failure.
      See Also:
    • topLevelPrepare

      public int topLevelPrepare()
      Description copied from class: AbstractRecord
      A prepare for a top-level transaction has occurred.
      Specified by:
      topLevelPrepare in class AbstractRecord
      Returns:
      TwoPhaseOutcome to indicate success/failure.
      See Also:
    • restore_state

      public boolean restore_state(InputObjectState os, int v)
      Saving of ActivationRecords is only undertaken during the Prepare phase of the top level 2PC.
      Overrides:
      restore_state in class AbstractRecord
      Returns:
      true if successful, false otherwise.
    • save_state

      public boolean save_state(OutputObjectState os, ObjectType v)
    • print

      public void print(PrintWriter strm)
      Description copied from class: AbstractRecord
      Write information about this specific instance to the specified stream.
      Overrides:
      print in class AbstractRecord
      Parameters:
      strm - the stream on which to output.
    • type

      public String type()
      Description copied from class: AbstractRecord
      Re-implementation of abstract methods inherited from base class.
      Overrides:
      type in class AbstractRecord
    • merge

      public void merge(AbstractRecord a)
      Description copied from class: AbstractRecord
      Merge the current record with the one presented.
      Specified by:
      merge in class AbstractRecord
      Parameters:
      a - the record with which to merge.
    • alter

      public void alter(AbstractRecord a)
      Description copied from class: AbstractRecord
      Alter the current record with the one presented.
      Specified by:
      alter in class AbstractRecord
      Parameters:
      a - the record with which to alter.
    • shouldAdd

      public boolean shouldAdd(AbstractRecord a)
      Description copied from class: AbstractRecord
      Should we add the record presented to the intentions list?
      Specified by:
      shouldAdd in class AbstractRecord
      Parameters:
      a - The record to try to add.
      Returns:
      true if the record should be added, false otherwise.
    • shouldAlter

      public boolean shouldAlter(AbstractRecord a)
      Description copied from class: AbstractRecord
      Should we alter the current record with the one presented?
      Specified by:
      shouldAlter in class AbstractRecord
      Parameters:
      a - The record to try to alter.
      Returns:
      true if the record should be altered, false otherwise.
    • shouldMerge

      public boolean shouldMerge(AbstractRecord a)
      Description copied from class: AbstractRecord
      Should we merge the current record with the one presented?
      Specified by:
      shouldMerge in class AbstractRecord
      Parameters:
      a - The record to try to merge.
      Returns:
      true if the record should be merged, false otherwise.
    • shouldReplace

      public boolean shouldReplace(AbstractRecord a)
      Description copied from class: AbstractRecord
      Should we replace the record presented with the current record?
      Specified by:
      shouldReplace in class AbstractRecord
      Parameters:
      a - The record to try to replace.
      Returns:
      true if the record should be replaced, false otherwise.