com.sleepycat.je.sync
Interface ChangeReader.ChangeTxn

All Known Implementing Classes:
LogChangeReader.JEChangeTxn
Enclosing interface:
ChangeReader

public static interface ChangeReader.ChangeTxn

A transaction that contains one or more Changes; used only by SyncProcessor implementations and custom sources of change set information.


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.
 

Method Detail

getTransactionId

long getTransactionId()
Returns the transction ID that can be shared with the external system.


getDataSetName

String getDataSetName()
Returns the name of the data set to which this transaction should be applied.


getDatabaseNames

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).


getOperations

Iterator<ChangeReader.Change> getOperations()
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.


discardChanges

void discardChanges(Transaction txn)
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.



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