com.sleepycat.je.sync.impl
Class LogChangeReader.JEChangeTxn

java.lang.Object
  extended by com.sleepycat.je.sync.impl.LogChangeReader.JEChangeTxn
All Implemented Interfaces:
ChangeReader.ChangeTxn
Enclosing class:
LogChangeReader

public class LogChangeReader.JEChangeTxn
extends Object
implements ChangeReader.ChangeTxn


Constructor Summary
LogChangeReader.JEChangeTxn(long txnId, long startPoint)
           
 
Method Summary
 void discardChanges(Transaction txn)
          Called when the changes in this transaction have been transferred to the external system, and they can be discarded locally.
 Set<String> getDatabaseNames()
          Returns the names of all local databases that are effected by this transaction and that are part of a single data set (specified by getDataSetName).
 String getDataSetName()
          Returns the name of the data set to which this transaction should be applied.
 Iterator<ChangeReader.Change> getOperations()
          Returns an iterator over the changes in this transactions, for a single data set (specified by getDataSetName).
 long getTransactionId()
          Returns the transction ID that can be shared with the external system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogChangeReader.JEChangeTxn

public LogChangeReader.JEChangeTxn(long txnId,
                                   long startPoint)
Method Detail

getTransactionId

public long getTransactionId()
Description copied from interface: ChangeReader.ChangeTxn
Returns the transction ID that can be shared with the external system.

Specified by:
getTransactionId in interface ChangeReader.ChangeTxn

getDataSetName

public String getDataSetName()
Description copied from interface: ChangeReader.ChangeTxn
Returns the name of the data set to which this transaction should be applied.

Specified by:
getDataSetName in interface ChangeReader.ChangeTxn

getDatabaseNames

public Set<String> getDatabaseNames()
Description copied from interface: ChangeReader.ChangeTxn
Returns the names of all local databases that are effected by this transaction and that are part of a single data set (specified by getDataSetName).

Specified by:
getDatabaseNames in interface ChangeReader.ChangeTxn

getOperations

public Iterator<ChangeReader.Change> getOperations()
Description copied from interface: ChangeReader.ChangeTxn
Returns an iterator over the changes in this transactions, for a single data set (specified by getDataSetName).

This method may be called more than once for a single transaction to iterate over the changes multiple times.

Specified by:
getOperations in interface ChangeReader.ChangeTxn

discardChanges

public void discardChanges(Transaction txn)
Description copied from interface: ChangeReader.ChangeTxn
Called when the changes in this transaction have been transferred to the external system, and they can be discarded locally.

The changes will not be discarded until the given txn has been committed. By using an XA transaction, the changes can be discarded locally only if they are also committed in the external system.

Specified by:
discardChanges in interface ChangeReader.ChangeTxn


Copyright (c) 2004-2012 Oracle. All rights reserved.