com.ibm.di.store
Class DeltaStore

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

public class DeltaStore
extends Object


Field Summary
static String TABLE_PREFIX
           
 
Constructor Summary
DeltaStore(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(String key)
           
 Entry findEntry(String key)
           
 Entry findEntryVerify(String key)
           
 Entry getNextDeletedEntry(boolean deleteEntry)
          Returns the next deleted Entry.
 Entry getNextDeletedEntry(boolean deleteEntry, Set keys)
          Returns the next deleted Entry, given a Set of keys for unchanged Entries.
 Entry getStatistics()
           
 void insertEntry(String key, Entry entry)
           
 void rollback()
          Rollback the last transactions
 void selectDeletedEntries()
           
 boolean setCommitMode(String mode)
          Set the commit behavior of Delta.
 void updateEntry(String key, Entry entry)
           
 void updateSequence(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 String TABLE_PREFIX
See Also:
Constant Field Values
Constructor Detail

DeltaStore

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

setCommitMode

public boolean setCommitMode(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 SQLException
Throws:
SQLException

updateSequence

public void updateSequence(String key)
                    throws Exception
Throws:
Exception

updateEntry

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

insertEntry

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

findEntry

public Entry findEntry(String key)
                throws Exception
Throws:
Exception

findEntryVerify

public Entry findEntryVerify(String key)
                      throws Exception
Throws:
Exception

deleteEntry

public void deleteEntry(String key)
                 throws Exception
Throws:
Exception

selectDeletedEntries

public void selectDeletedEntries()
                          throws Exception
Throws:
Exception

getNextDeletedEntry

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

Throws:
Exception

getNextDeletedEntry

public Entry getNextDeletedEntry(boolean deleteEntry,
                                 Set keys)
                          throws 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:
Exception

getStatistics

public Entry getStatistics()

commit

public void commit()
            throws SQLException
Commit the last transactions

Throws:
SQLException - Thrown if an error occurs

rollback

public void rollback()
              throws SQLException
Rollback the last transactions

Throws:
SQLException - Thrown if an error occurs

commitOnEndIter

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

Throws:
SQLException - Thrown if an error occurs