com.atomikos.icatch.imp
Class PropagationImp

java.lang.Object
  extended by com.atomikos.icatch.imp.PropagationImp
All Implemented Interfaces:
Propagation, Serializable

public class PropagationImp
extends Object
implements Propagation

Implementation of Propagation interface.

See Also:
Serialized Form

Constructor Summary
PropagationImp(Stack lineage, boolean serial, long timeout)
          Construct a new instance.
 
Method Summary
static Propagation adaptPropagation(Propagation propagation, RecoveryCoordinator adaptor)
          Create a new instance.
 boolean equals(Object o)
          Required for JBoss integration: client demarcation depends on this.
 Stack getLineage()
          Gets the ancestor information as a stack.
 long getTimeOut()
           
 int hashCode()
          Required for JBoss integration.
 boolean isSerial()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropagationImp

public PropagationImp(Stack lineage,
                      boolean serial,
                      long timeout)
Construct a new instance.

Parameters:
lineage - The lineage stack of ancestors.
serial - Serial mode indicator.
timeout - The timeout left for the tx.
Method Detail

adaptPropagation

public static Propagation adaptPropagation(Propagation propagation,
                                           RecoveryCoordinator adaptor)
Create a new instance. This method replaces the lowest ancestor by an adaptor (interposition) for both efficiency and correct replay handling. Implementations of ImportingTransactionManager should use this method to convert an incoming propagation into the proper local instance, or replay requests will not work properly.

Parameters:
propagation - The propagation for which to create a new instance.
adaptor - The adaptor for replay requests.

getLineage

public Stack getLineage()
Description copied from interface: Propagation
Gets the ancestor information as a stack.

Specified by:
getLineage in interface Propagation
Returns:
Stack The ancestor transactions.
See Also:
Propagation

isSerial

public boolean isSerial()
Specified by:
isSerial in interface Propagation
Returns:
boolean True if serial mode was set.
See Also:
Propagation

getTimeOut

public long getTimeOut()
Specified by:
getTimeOut in interface Propagation
Returns:
long The time left before timeout, in millis.
See Also:
Propagation

equals

public boolean equals(Object o)
Required for JBoss integration: client demarcation depends on this.

Overrides:
equals in class Object

hashCode

public int hashCode()
Required for JBoss integration.

Overrides:
hashCode in class Object


Copyright © 2012. All Rights Reserved.