|
|||||||||||
| 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 ArmTransactionpublic long blocked()
blocked in interface ArmTransactionunblocked(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 ArmTransactionpublic java.lang.String getContextURIValue()
getContextURIValue in interface ArmTransactionpublic java.lang.String getContextValue(int index)
getContextValue in interface ArmTransactionpublic ArmCorrelator getCorrelator()
start()
first, before you call this method. If you forget, you'll get an Exception back.
getCorrelator in interface ArmTransactionpublic ArmCorrelator getParentCorrelator()
getParentCorrelator in interface ArmTransactionpublic 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 ArmTransactionstop(int)public ArmTransactionDefinition getDefinition()
getDefinition in interface ArmTransactionpublic ArmUser getUser()
getUser in interface ArmTransactionpublic boolean isTraceRequested()
isTraceRequested in interface ArmTransactionpublic int reset()
reset in interface ArmTransactionpublic int setArrivalTime()
start(). When you later call stop(int), the difference between the arrival time and start time will be
differentiated.
setArrivalTime in interface ArmTransactionpublic int setContextURIValue(java.lang.String value)
setContextURIValue in interface ArmTransaction
public int setContextValue(int index,
java.lang.String value)
setContextValue in interface ArmTransactionpublic int setTraceRequested(boolean traceState)
setTraceRequested in interface ArmTransactionpublic int setUser(ArmUser user)
setUser in interface ArmTransactionpublic int start()
start in interface ArmTransactionpublic int start(byte[] parentCorr)
start in interface ArmTransactionparentCorr -
public int start(byte[] parentCorr,
int offset)
start in interface ArmTransactionpublic int start(ArmCorrelator parentCorr)
start in interface ArmTransactionparentCorr -
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 ArmTransactionstatus - 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 ArmTransactionstatus - Completion status of the transaction.diagnosticDetail - Additional message text that should be recorded with the stop.
public int unbindThread()
unbindThread in interface ArmTransactionpublic int unblocked(long blockHandle)
unblocked in interface ArmTransactionblockHandle - The magic number that you got as a return value from calling blocked()
public int update()
update in interface ArmTransactionpublic long getStartTime()
getStartTime in interface TransactionStatepublic void setStartTime(long startTime)
setStartTime in interface TransactionStatepublic long getArrivalTime()
getArrivalTime in interface TransactionStatepublic void setArrivalTime(long arrivalTime)
setArrivalTime in interface TransactionStatepublic boolean getTraceState()
getTraceState in interface TransactionStatepublic void setTraceState(boolean traceState)
setTraceState in interface TransactionStatepublic void setParentCorrelator(ArmCorrelator parentCorrelator)
setParentCorrelator in interface TransactionStatepublic long getBlockingHandle()
getBlockingHandle in interface TransactionStatepublic ArmID getId()
public boolean equals(java.lang.Object o)
equals in class UniqueObjectImplpublic int hashCode()
hashCode in class UniqueObjectImpl
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||