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()
          Get the ancestor information as a stack.
 long getTimeOut()
          Get the timeout left for the composite transaction.
 int hashCode()
          Required for JBoss integration.
 boolean isSerial()
          Test if serial mode or not; if serial, no parallelism allowed.
 
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
Get the ancestor information as a stack.

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

isSerial

public boolean isSerial()
Description copied from interface: Propagation
Test if serial mode or not; if serial, no parallelism allowed.

Specified by:
isSerial in interface Propagation
Returns:
boolean True iff serial mode is set.
See Also:
Propagation

getTimeOut

public long getTimeOut()
Description copied from interface: Propagation
Get the timeout left for the composite transaction.

Specified by:
getTimeOut in interface Propagation
Returns:
long The time left before timeout.
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 © 2011. All Rights Reserved.