Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.mq.pm
Class Tx

    java.lang.Object
      org.jboss.mq.pm.Tx

All Implemented Interfaces:
  Comparable, Externalizable, Serializable

public class Tx
extends Object
implements Comparable, Externalizable

A transaction

Version:
  $Revision: 1.4 $
Author:
  Adrian Brock
See Also:
  Serialized Form

Constructor Summary
`Tx()` Create a new Tx for externailzation
`Tx(long value)` Create a new Tx

Method Summary
`void` | `addPostRollbackTask(Runnable task)` Add post rollback task
`boolean` | `checkPersisted()` Get whether the transaction has been persisted
`int` | `compareTo(Object o)`
`int` | `compareTo(Tx anotherLong)` Compare
`int` | `hashCode()`
`long` | `longValue()` Get the long value
`void` | `readExternal(ObjectInput in)`
`void` | `rollback(PersistenceManager pm)` Commit the transaction
`void` | `setValue(long tx)` Set the value
`String` | `toString()`
`boolean` | `wasPersisted()` Get whether the transaction has been persisted
`void` | `writeExternal(ObjectOutput out)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Tx

    public Tx()

  Create a new Tx for externailzation

### Tx

    public Tx(long value)

  Create a new Tx

Parameters:
  `value` - the value

Method Detail

### setValue

    public void setValue(long tx)

  Set the value

  Parameters:
    `tx` - the new value

### longValue

    public long longValue()

  Get the long value

  Returns:
    the long value

### checkPersisted

    public boolean checkPersisted()

  Get whether the transaction has been persisted

  Returns:
    true when persisted

### wasPersisted

    public boolean wasPersisted()

  Get whether the transaction has been persisted

  Returns:
    true when persisted

### compareTo

    public int compareTo(Tx anotherLong)

  Compare

  Parameters:
    `anotherLong` - the other value
  Returns:
    -1, 0, 1 if less than, equal or greater than respectively

### compareTo

    public int compareTo(Object o)

  Specified by:
    `compareTo` in interface `Comparable`

### readExternal

    public void readExternal(ObjectInput in)
                      throws IOException

  Specified by:
    `readExternal` in interface `Externalizable`
  Throws:
    `IOException`

### writeExternal

    public void writeExternal(ObjectOutput out)
                       throws IOException

  Specified by:
    `writeExternal` in interface `Externalizable`
  Throws:
    `IOException`

### toString

    public String toString()

### hashCode

    public int hashCode()

### rollback

    public void rollback(PersistenceManager pm)
                  throws javax.jms.JMSException

  Commit the transaction

  Parameters:
    `pm` - the persistence manager
  Throws:
    `JMSExecption` - for any error
    `javax.jms.JMSException`

### addPostRollbackTask

    public void addPostRollbackTask(Runnable task)
                             throws javax.jms.JMSException

  Add post rollback task

  Parameters:
    `task` - the task
  Throws:
    `JMSExecption` - for any error
    `javax.jms.JMSException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.