SolarMetric Kodo JDO 3.4.1 generated on May 30 2006

kodo.jdbc.runtime
Class TableLockUpdateManagerImpl

java.lang.Object
  |
  +--kodo.jdbc.runtime.UpdateManagerImpl
        |
        +--kodo.jdbc.runtime.TableLockUpdateManagerImpl
All Implemented Interfaces:
Configurable, UpdateManager

public class TableLockUpdateManagerImpl
extends UpdateManagerImpl

Example update manager, capable of statement batching, that ignores foreign keys and autoincrement, but optimizes for table level locking. Esp. important when using table level locking and trying to avoid deadlocks.


Constructor Summary
TableLockUpdateManagerImpl()
           
 
Method Summary
protected  Collection flush(RowManagerImpl rowMgr, kodo.jdbc.runtime.PreparedStatementManager psMgr, Collection exceps)
          Flush all rows of the given row manager.
protected  Collection sortTables(Collection trms)
          Sort tables.
 
Methods inherited from class kodo.jdbc.runtime.UpdateManagerImpl
addException, endConfiguration, flush, flush, getMaximizeBatchSize, setConfiguration, setMaximizeBatchSize, startConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableLockUpdateManagerImpl

public TableLockUpdateManagerImpl()
Method Detail

flush

protected Collection flush(RowManagerImpl rowMgr,
                           kodo.jdbc.runtime.PreparedStatementManager psMgr,
                           Collection exceps)
Description copied from class: UpdateManagerImpl
Flush all rows of the given row manager. Add exceptions to exceps (which may start out as null) using UpdateManagerImpl.addException(java.util.Collection, java.lang.Exception). Return exceps.
Overrides:
flush in class UpdateManagerImpl

sortTables

protected Collection sortTables(Collection trms)
Sort tables. This implementation sorts tables lexically by table name. This is good for avoiding deadlocks in systems with table level locking. Some orderings may avoid deadlocks and be more scalable. E.g. sorting such that certain tables always come last will reduce the amount of time that those tables are locked. Sort order should probably be constant, though, in order to avoid deadlocks.

SolarMetric Kodo JDO 3.4.1 generated on May 30 2006

Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.