|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.m2technologies.open_arm.transaction.ArmInterfaceImpl
net.m2technologies.open_arm.transaction.UniqueObjectImpl
net.m2technologies.open_arm.transaction.ArmTransactionImpl
Copyright 2005 Mark Masterson
Licensed under the Apache License, Version 2.0 (the "License");
you may
not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Field Summary |
Fields inherited from class net.m2technologies.open_arm.transaction.ArmInterfaceImpl |
HASH_CODE_MAGIC_NUMBER |
Constructor Summary | |
ArmTransactionImpl(ArmTransactionFactory creatingFactory,
ArmTransactionDefinition transactionDefiniton,
ArmApplication app,
java.lang.String[] contextValues)
|
Method Summary | |
int |
bindThread()
Deprecated. because C programmers don't like OO |
long |
blocked()
Use this method to notify OpenArm that your transaction has reached a point where it will have to wait, synchronously, for some external resource. |
boolean |
equals(java.lang.Object o)
|
ArmApplication |
getApplication()
Each transaction gets initialized with an instance of the ArmApplication within whose context the transaction is running. |
long |
getArrivalTime()
|
long |
getBlockingHandle()
|
java.lang.String |
getContextURIValue()
|
java.lang.String |
getContextValue(int index)
|
ArmCorrelator |
getCorrelator()
You should only call this method within a transactional scope -- that means you should always call start()
first, before you call this method. |
ArmTransactionDefinition |
getDefinition()
Each transaction gets initialized with an instance of the ArmTransactionDefinition that represents the type of the transaction. |
ArmID |
getId()
|
ArmCorrelator |
getParentCorrelator()
If there was a parent correlator at instantiation, you get it back with this method. |
long |
getStartTime()
|
int |
getStatus()
The stop(int) method requires an int parameter that represents the completion status of the transaction. |
boolean |
getTraceState()
|
ArmUser |
getUser()
|
int |
hashCode()
|
boolean |
isTraceRequested()
|
int |
reset()
Calling this will reset all of the counters being maintained within a transactional scope. These include: -- start time -- arrival time -- trace state -- the parent correlator |
int |
setArrivalTime()
Used to set the arrival time of the transactional scope. Let's say you've got a transaction with a somewhat complex phase structure, and you have some sort of setup that happens immediately after the transaction starts, but before the point where you think the real action gets going. |
void |
setArrivalTime(long arrivalTime)
|
int |
setContextURIValue(java.lang.String value)
|
int |
setContextValue(int index,
java.lang.String value)
|
void |
setParentCorrelator(ArmCorrelator parentCorrelator)
|
void |
setStartTime(long startTime)
|
int |
setTraceRequested(boolean traceState)
|
void |
setTraceState(boolean traceState)
|
int |
setUser(ArmUser user)
|
int |
start()
Used to start the clock for this transactional scope. |
int |
start(ArmCorrelator parentCorr)
Used to start the clock for this transactional scope. |
int |
start(byte[] parentCorr)
Used to start the clock for this transactional scope. |
int |
start(byte[] parentCorr,
int offset)
Deprecated. because C programmers don't like OO |
int |
stop(int status)
Used to stop the clock for this transactional scope. |
int |
stop(int status,
java.lang.String diagnosticDetail)
Used to stop the clock for this transactional scope. |
int |
unbindThread()
Deprecated. because C programmers don't like OO |
int |
unblocked(long blockHandle)
Use this method to notify OpenArm that your transaction has stopped waiting synchronously, for some external resource. |
int |
update()
Use this method to notify OpenArm that your transaction is still out there and alive. |
Methods inherited from class net.m2technologies.open_arm.transaction.UniqueObjectImpl |
getID, getName |
Methods inherited from class net.m2technologies.open_arm.transaction.ArmInterfaceImpl |
getCreatingFactory, getErrorCode, getErrorMessage, setErrorCode, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.opengroup.arm40.transaction.ArmInterface |
getErrorCode, getErrorMessage, setErrorCode |
Methods inherited from interface net.m2technologies.open_arm.transaction.UniqueObject |
getID, getName |
Constructor Detail |
public ArmTransactionImpl(ArmTransactionFactory creatingFactory, ArmTransactionDefinition transactionDefiniton, ArmApplication app, java.lang.String[] contextValues)
Method Detail |
public int bindThread()
bindThread
in interface ArmTransaction
public long blocked()
blocked
in interface ArmTransaction
unblocked(long)
, and if we were C
programmers, it might have some meaning. But we're not, so it doesn't.public ArmApplication getApplication()
getApplication
in interface ArmTransaction
public java.lang.String getContextURIValue()
getContextURIValue
in interface ArmTransaction
public java.lang.String getContextValue(int index)
getContextValue
in interface ArmTransaction
public ArmCorrelator getCorrelator()
start()
first, before you call this method. If you forget, you'll get an Exception back.
getCorrelator
in interface ArmTransaction
public ArmCorrelator getParentCorrelator()
getParentCorrelator
in interface ArmTransaction
public int getStatus()
stop(int)
method requires an int parameter that represents the completion status of the transaction. The
ArmConstants
interface contains a handful of values that one can use for this. Each call to stop(int)
sets an instance variable, which is used to retain the value of this completion status until the next time
stop(int)
is called. In between stop(int)
calls, you can retrieve the previous status at any time by
calling this method.
getStatus
in interface ArmTransaction
stop(int)
public ArmTransactionDefinition getDefinition()
getDefinition
in interface ArmTransaction
public ArmUser getUser()
getUser
in interface ArmTransaction
public boolean isTraceRequested()
isTraceRequested
in interface ArmTransaction
public int reset()
reset
in interface ArmTransaction
public int setArrivalTime()
start()
. When you later call stop(int)
, the difference between the arrival time and start time will be
differentiated.
setArrivalTime
in interface ArmTransaction
public int setContextURIValue(java.lang.String value)
setContextURIValue
in interface ArmTransaction
public int setContextValue(int index, java.lang.String value)
setContextValue
in interface ArmTransaction
public int setTraceRequested(boolean traceState)
setTraceRequested
in interface ArmTransaction
public int setUser(ArmUser user)
setUser
in interface ArmTransaction
public int start()
start
in interface ArmTransaction
public int start(byte[] parentCorr)
start
in interface ArmTransaction
parentCorr
-
public int start(byte[] parentCorr, int offset)
start
in interface ArmTransaction
public int start(ArmCorrelator parentCorr)
start
in interface ArmTransaction
parentCorr
-
public int stop(int status)
ArmConstants
interface contains a handful of values that one
can use for this. Each call to stop(int)
sets an instance variable, which is used to retain the value of
this completion status until the next time stop(int)
is called. In between stop(int)
calls, you can
retrieve the previous status at any time by calling the getStatus()
method.
stop
in interface ArmTransaction
status
- Completion status of the transaction.
public int stop(int status, java.lang.String diagnosticDetail)
ArmConstants
interface contains a handful of values that one
can use for this. Each call to stop(int)
sets an instance variable, which is used to retain the value of
this completion status until the next time stop(int)
is called. In between stop(int)
calls, you can
retrieve the previous status at any time by calling the getStatus()
method.
stop
in interface ArmTransaction
status
- Completion status of the transaction.diagnosticDetail
- Additional message text that should be recorded with the stop.
public int unbindThread()
unbindThread
in interface ArmTransaction
public int unblocked(long blockHandle)
unblocked
in interface ArmTransaction
blockHandle
- The magic number that you got as a return value from calling blocked()
public int update()
update
in interface ArmTransaction
public long getStartTime()
getStartTime
in interface TransactionState
public void setStartTime(long startTime)
setStartTime
in interface TransactionState
public long getArrivalTime()
getArrivalTime
in interface TransactionState
public void setArrivalTime(long arrivalTime)
setArrivalTime
in interface TransactionState
public boolean getTraceState()
getTraceState
in interface TransactionState
public void setTraceState(boolean traceState)
setTraceState
in interface TransactionState
public void setParentCorrelator(ArmCorrelator parentCorrelator)
setParentCorrelator
in interface TransactionState
public long getBlockingHandle()
getBlockingHandle
in interface TransactionState
public ArmID getId()
public boolean equals(java.lang.Object o)
equals
in class UniqueObjectImpl
public int hashCode()
hashCode
in class UniqueObjectImpl
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |