com.ibm.di.store
Class DeltaStore

java.lang.Object
  extended by com.ibm.di.store.DeltaStore

public class DeltaStore
extends java.lang.Object


Field Summary
static java.lang.String TABLE_PREFIX
           
 
Constructor Summary
DeltaStore(java.lang.String identifier, boolean isRestarting)
           
 
Method Summary
 void closeDelta()
           
 void commit()
          Commit the last transactions
 void commitOnEndIter()
          Commit if in commit mode "On end of AL cycle"
 void deleteEntry(java.lang.String key)
           
 Entry findEntry(java.lang.String key)
           
 Entry findEntryVerify(java.lang.String key)
           
 Entry getNextDeletedEntry(boolean deleteEntry)
          Returns the next deleted Entry.
 Entry getNextDeletedEntry(boolean deleteEntry, java.util.Set<java.lang.String> keys)
          Returns the next deleted Entry, given a Set of keys for unchanged Entries.
 Entry getStatistics()
           
 java.lang.String getStatisticsString()
           
 void insertEntry(java.lang.String key, Entry entry)
           
 void rollback()
          Rollback the last transactions
 void selectDeletedEntries()
           
 void setAllowDuplicateDeltaKeys(boolean allowDuplicateDeltaKeys)
          Indicates whether the duplicate delta keys are allowed.
 boolean setCommitMode(java.lang.String mode)
          Set the commit behavior of Delta.
 void updateEntry(java.lang.String key, Entry entry)
           
 void updateSequence(java.lang.String key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TABLE_PREFIX

public static final java.lang.String TABLE_PREFIX
See Also:
Constant Field Values
Constructor Detail

DeltaStore

public DeltaStore(java.lang.String identifier,
                  boolean isRestarting)
           throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

setCommitMode

public boolean setCommitMode(java.lang.String mode)
Set the commit behavior of Delta.

Parameters:
mode - The intended behavior. Possible values are:
  • "After every database operation"
  • "On Connector close"
  • "On end of AL cycle"
  • "No autocommit"
Returns:
false if the requested mode is not a legal value

closeDelta

public void closeDelta()
                throws java.sql.SQLException
Throws:
java.sql.SQLException

updateSequence

public void updateSequence(java.lang.String key)
                    throws java.lang.Exception
Throws:
java.lang.Exception

updateEntry

public void updateEntry(java.lang.String key,
                        Entry entry)
                 throws java.lang.Exception
Throws:
java.lang.Exception

insertEntry

public void insertEntry(java.lang.String key,
                        Entry entry)
                 throws java.lang.Exception
Throws:
java.lang.Exception

findEntry

public Entry findEntry(java.lang.String key)
                throws java.lang.Exception
Throws:
java.lang.Exception

findEntryVerify

public Entry findEntryVerify(java.lang.String key)
                      throws java.lang.Exception
Throws:
java.lang.Exception

deleteEntry

public void deleteEntry(java.lang.String key)
                 throws java.lang.Exception
Throws:
java.lang.Exception

selectDeletedEntries

public void selectDeletedEntries()
                          throws java.lang.Exception
Throws:
java.lang.Exception

getNextDeletedEntry

public Entry getNextDeletedEntry(boolean deleteEntry)
                          throws java.lang.Exception
Returns the next deleted Entry.

Throws:
java.lang.Exception

getNextDeletedEntry

public Entry getNextDeletedEntry(boolean deleteEntry,
                                 java.util.Set<java.lang.String> keys)
                          throws java.lang.Exception
Returns the next deleted Entry, given a Set of keys for unchanged Entries. Will not return any Entry with a key in the given Set.

Parameters:
deleteEntry - - If set, also delete the Entry from the deltaStore
keys - - Should be null, or a Set containing keys for unchanged entries
Returns:
The next deleted Entry
Throws:
java.lang.Exception

getStatistics

public Entry getStatistics()

getStatisticsString

public java.lang.String getStatisticsString()
Returns:
The statistics for this run
Since:
7.0

commit

public void commit()
            throws java.sql.SQLException
Commit the last transactions

Throws:
java.sql.SQLException - Thrown if an error occurs

rollback

public void rollback()
              throws java.sql.SQLException
Rollback the last transactions

Throws:
java.sql.SQLException - Thrown if an error occurs

commitOnEndIter

public void commitOnEndIter()
                     throws java.sql.SQLException
Commit if in commit mode "On end of AL cycle"

Throws:
java.sql.SQLException - Thrown if an error occurs

setAllowDuplicateDeltaKeys

public void setAllowDuplicateDeltaKeys(boolean allowDuplicateDeltaKeys)
Indicates whether the duplicate delta keys are allowed.

Parameters:
allowDuplicateDeltaKeys - true if duplicate delta keys are allowed false otherwise