org.arm4.arm40.transaction

Class ArmTransaction

public class ArmTransaction extends ArmInterface implements ArmTransaction

For most applications, ArmTransaction is the most important of all the ARM classes, and the most frequently used. Instances of ArmTransaction represent transactions when they execute. A "transaction" is any unit of work that has a clearly understood beginning and ending point, and which begins and ends in the same VM. ArmTransaction is created with the newArmTransaction() method of ArmTransactionFactory.
		ArmConstants.STATUS_ABORT - if the transaction was blocked on a thread.
      ArmConstants.STATUS_FAILED - If the transaction failed.
      ArmConstants.STATUS_GOOD - If a transaction has successfully started or has been updated.
      ArmConstants.STATUS_INVALID - When a transaction is instructed to be stopped, the transaction will be marked invlid and it should never execute again.
      ArmConstants.STATUS_UNKNOWN - When a transaction is first created it will be in an unknown state.
 

Version: $Revision$ $Date$

Author: dcarter

Field Summary
static intARM_SUCCESS
protected ArmApplicationm_application
protected longm_arrivalTime
protected Stringm_contextUri
protected ArrayListm_contextValues
protected ArmCorrelatorm_currentCorrelator
protected ArmTransactionDefinitionm_definition
protected ArmMetricGroupm_metricGroup
protected ArmCorrelatorm_parentCorrelator
protected intm_status
protected booleanm_traceRequested
protected longm_transactionHandle
protected ArmUserm_user
Constructor Summary
ArmTransaction(ArmApplication app, ArmTransactionDefinition def, ArmFactory factory)
Create the ARM Transaction.
ArmTransaction(ArmApplication app, ArmTransactionDefinition def, ArmMetricGroup group, ArmFactory factory)
Create the ARM Transaction.
Method Summary
intbindThread()
longblocked()
ArmApplicationgetApplication()
StringgetContextURIValue()
StringgetContextValue(int index)
ArmCorrelatorgetCorrelator()
ArmTransactionDefinitiongetDefinition()
protected ArmMetricGroupgetMetricGroup()
Get the metric group.
ArmCorrelatorgetParentCorrelator()
intgetStatus()
ArmUsergetUser()
booleanisTraceRequested()
intreset()
intsetArrivalTime()
intsetContextURIValue(String value)
intsetContextValue(int index, String value)
intsetCorrelator(ArmCorrelator correlator)
Set the correlator.
intsetParentCorrelator(ArmCorrelator parent)
Set the parent correlator.
intsetTraceRequested(boolean traceState)
intsetUser(ArmUser user)
intstart()
intstart(byte[] parentCorr)
intstart(byte[] parentCorr, int offset)
intstart(ArmCorrelator parentCorr)
intstop(int status)
intstop(int status, String diagnosticDetail)
intunbindThread()
intunblocked(long blockHandle)
intupdate()

Field Detail

ARM_SUCCESS

public static final int ARM_SUCCESS

m_application

protected ArmApplication m_application

m_arrivalTime

protected long m_arrivalTime

m_contextUri

protected String m_contextUri

m_contextValues

protected ArrayList m_contextValues

m_currentCorrelator

protected ArmCorrelator m_currentCorrelator

m_definition

protected ArmTransactionDefinition m_definition

m_metricGroup

protected ArmMetricGroup m_metricGroup

m_parentCorrelator

protected ArmCorrelator m_parentCorrelator

m_status

protected int m_status

m_traceRequested

protected boolean m_traceRequested

m_transactionHandle

protected long m_transactionHandle

m_user

protected ArmUser m_user

Constructor Detail

ArmTransaction

public ArmTransaction(ArmApplication app, ArmTransactionDefinition def, ArmFactory factory)
Create the ARM Transaction.

Parameters: app def factory

ArmTransaction

public ArmTransaction(ArmApplication app, ArmTransactionDefinition def, ArmMetricGroup group, ArmFactory factory)
Create the ARM Transaction.

Parameters: app def group factory

Method Detail

bindThread

public int bindThread()

blocked

public long blocked()

getApplication

public ArmApplication getApplication()

getContextURIValue

public String getContextURIValue()

getContextValue

public String getContextValue(int index)

getCorrelator

public ArmCorrelator getCorrelator()

getDefinition

public ArmTransactionDefinition getDefinition()

getMetricGroup

protected ArmMetricGroup getMetricGroup()
Get the metric group.

Returns:

getParentCorrelator

public ArmCorrelator getParentCorrelator()

getStatus

public int getStatus()

getUser

public ArmUser getUser()

isTraceRequested

public boolean isTraceRequested()

reset

public int reset()

setArrivalTime

public int setArrivalTime()

setContextURIValue

public int setContextURIValue(String value)

setContextValue

public int setContextValue(int index, String value)

setCorrelator

public int setCorrelator(ArmCorrelator correlator)
Set the correlator.

Parameters: correlator

Returns:

setParentCorrelator

public int setParentCorrelator(ArmCorrelator parent)
Set the parent correlator.

Parameters: parent

Returns:

setTraceRequested

public int setTraceRequested(boolean traceState)

setUser

public int setUser(ArmUser user)

start

public int start()

start

public int start(byte[] parentCorr)

start

public int start(byte[] parentCorr, int offset)

start

public int start(ArmCorrelator parentCorr)

stop

public int stop(int status)

stop

public int stop(int status, String diagnosticDetail)

unbindThread

public int unbindThread()

unblocked

public int unblocked(long blockHandle)

update

public int update()