6.11. StateManagerSet configuration

The default StateManagerSet (com.solarmetric.kodo.runtime.FifoStateManagerSet) maintains the list of transactional persistence-capable objects in the order that they were dirtied in a transaction. In general, this is a good approach since it allows non-deferred referential integrity constraints to be met. If constraint checking is deferred or is disabled, then it is possible to increase performance by using the com.solarmetric.kodo.runtime.ClassGroupStateManagerSet. This class groups the persistence-capable objects that are involved in a transaction by class, so that when they are flushed to the database, Kodo is capable of increasing the amount of batching that can be performed. To use the ClassGroupStateManagerSet, set the com.solarmetric.kodo.TransactionCacheClass property to com.solarmetric.kodo.runtime.ClassGroupStateManagerSet.