com.sleepycat.je.sync.impl
Class LogChangeReader

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

public class LogChangeReader
extends Object
implements ChangeReader


Nested Class Summary
 class LogChangeReader.DbInfo
           
 class LogChangeReader.JEChange
           
 class LogChangeReader.JEChangeTxn
           
(package private)  class LogChangeReader.LogChangeIterator
           
 
Nested classes/interfaces inherited from interface com.sleepycat.je.sync.ChangeReader
ChangeReader.Change, ChangeReader.ChangeTxn, ChangeReader.ChangeType
 
Field Summary
static LogEntryType[] targetTypes
           
 
Constructor Summary
LogChangeReader(Environment env, String dataSetName, SyncProcessor processor, boolean consolidateTransactions, long consolidateMaxMemory)
           
 
Method Summary
 void discardChanges(Transaction txn)
          Called when the changes in all transactions returned by the getChangeTxns iterator have been transferred to the external system, and they can be discarded locally.
 LogChangeSet getChangeSet()
           
 Iterator<ChangeReader.ChangeTxn> getChangeTxns()
          Returns an iterator over all transactions containing changes for one of the data sets of interest (specified by SyncProcessor.getChangeSet and indirectly by SyncProcessor.sync or syncAll).
 Map<DatabaseId,LogChangeReader.DbInfo> getSyncDbs()
           
 void setWaitHook(TestHook waitHook)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

targetTypes

public static final LogEntryType[] targetTypes
Constructor Detail

LogChangeReader

public LogChangeReader(Environment env,
                       String dataSetName,
                       SyncProcessor processor,
                       boolean consolidateTransactions,
                       long consolidateMaxMemory)
Method Detail

getSyncDbs

public Map<DatabaseId,LogChangeReader.DbInfo> getSyncDbs()

getChangeSet

public LogChangeSet getChangeSet()

getChangeTxns

public Iterator<ChangeReader.ChangeTxn> getChangeTxns()
Description copied from interface: ChangeReader
Returns an iterator over all transactions containing changes for one of the data sets of interest (specified by SyncProcessor.getChangeSet and indirectly by SyncProcessor.sync or syncAll).

If a single transaction applies to more than one change set, a separate transaction will be returned by the iterator.

If this method is called more than once for a given change set, the information returned may be different each time, because changes may be discarded by ChangeTxn.discardChanges and additional changes may appear as they are being written.

Specified by:
getChangeTxns in interface ChangeReader

setWaitHook

public void setWaitHook(TestHook waitHook)

discardChanges

public void discardChanges(Transaction txn)
Description copied from interface: ChangeReader
Called when the changes in all transactions returned by the getChangeTxns iterator 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


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