org.datanucleus
Class FlushNonReferential

java.lang.Object
  extended by org.datanucleus.FlushNonReferential
All Implemented Interfaces:
FlushProcess

public class FlushNonReferential
extends Object
implements FlushProcess

Flush method for cases where the datastore doesn't use referential integrity so we can send batches of deletes, then batches of inserts, then any updates to optimise the persistence.


Field Summary
 
Fields inherited from interface org.datanucleus.FlushProcess
LOCALISER
 
Constructor Summary
FlushNonReferential()
           
 
Method Summary
 List<NucleusOptimisticException> execute(ExecutionContext ec, List<ObjectProvider> primaryOPs, List<ObjectProvider> secondaryOPs, SCOOperationQueue scoQueue)
          Execute the flush.
 List<NucleusOptimisticException> flushDeleteInsertUpdateGrouped(Set<ObjectProvider> opsToFlush, ExecutionContext ec)
          Method that does the flushing of the passed ObjectProviders, grouping them into all DELETEs, then all INSERTs, finally all UPDATEs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlushNonReferential

public FlushNonReferential()
Method Detail

execute

public List<NucleusOptimisticException> execute(ExecutionContext ec,
                                                List<ObjectProvider> primaryOPs,
                                                List<ObjectProvider> secondaryOPs,
                                                SCOOperationQueue scoQueue)
Description copied from interface: FlushProcess
Execute the flush.

Specified by:
execute in interface FlushProcess
Parameters:
ec - ExecutionContext
primaryOPs - ObjectProviders that were made dirty by direct API calls. Cleared during this method
secondaryOPs - ObjectProviders that were made dirty by reachability. Cleared during this method
scoQueue - Queue of SCO operations
Returns:
Any optimistic exceptions during the deletes/inserts/updates

flushDeleteInsertUpdateGrouped

public List<NucleusOptimisticException> flushDeleteInsertUpdateGrouped(Set<ObjectProvider> opsToFlush,
                                                                       ExecutionContext ec)
Method that does the flushing of the passed ObjectProviders, grouping them into all DELETEs, then all INSERTs, finally all UPDATEs. The StorePersistenceHandler will get calls to deleteObjects, insertObjects and updateObject (for each other one). Note that this is in a separate method to allow calls by other FlushProcesses that want to take advantage of the basic flush method without

Parameters:
opsToFlush - The ObjectProviders to process
ec - ExecutionContext
Returns:
Any optimistic verification exceptions thrown during flush


Copyright © 2013. All Rights Reserved.