org.exolab.jms.tranlog
Class BaseTransactionLogEntry

java.lang.Object
  extended by org.exolab.jms.tranlog.BaseTransactionLogEntry
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable
Direct Known Subclasses:
DataTransactionLogEntry, StateTransactionLogEntry

public abstract class BaseTransactionLogEntry
extends java.lang.Object
implements java.io.Externalizable

This is the base entry that is streamed into the transaction log file. All other transaction log entry classes must extend this class.

Each entry has the associated XID and the created time stamp, along with the identity of the resource that created the entry

See Also:
Serialized Form

Method Summary
 long getCreated()
          Return the time that this entry was created
 long getExpiryTime()
          Retrieve the expiry time of this transaction
 ExternalXid getExternalXid()
          Get the transaction identifier
 java.lang.String getResourceId()
          Get the resource identifier
 void readExternal(java.io.ObjectInput stream)
           
 void setCreated()
          Set the created time of this entry to now
 void setCreated(long time)
          Set the time in ms that this record was created
 void setExpiryTime(long time)
          Set the expiry time for this transaction, which is an absolute time in milliseconds.
 void setExternalXid(ExternalXid txid)
          Set the transaction identifier
 void setResourceId(java.lang.String rid)
          Set the resource identity for the entry
 boolean transactionExpired()
          Check whether the trnasaction has expired
 void writeExternal(java.io.ObjectOutput stream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setExternalXid

public void setExternalXid(ExternalXid txid)
Set the transaction identifier

Parameters:
txid - - the transaction identifier

getExternalXid

public ExternalXid getExternalXid()
Get the transaction identifier

Returns:
ExternalXid

setResourceId

public void setResourceId(java.lang.String rid)
Set the resource identity for the entry

Parameters:
rid - - the resource identity

getResourceId

public java.lang.String getResourceId()
Get the resource identifier

Returns:
the resource identifier

setCreated

public void setCreated(long time)
Set the time in ms that this record was created

Parameters:
time - - time in ms

setCreated

public void setCreated()
Set the created time of this entry to now


getCreated

public long getCreated()
Return the time that this entry was created

Returns:
long

setExpiryTime

public void setExpiryTime(long time)
Set the expiry time for this transaction, which is an absolute time in milliseconds.

Parameters:
long - - absolute expiry time

getExpiryTime

public long getExpiryTime()
Retrieve the expiry time of this transaction

Returns:
long

transactionExpired

public boolean transactionExpired()
Check whether the trnasaction has expired

Returns:
boolean - true if it has expired; false otherwise

writeExternal

public void writeExternal(java.io.ObjectOutput stream)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput stream)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException


Copyright © 1999-2012 The OpenJMS Group. All Rights Reserved.