Class FlushNonReferential

  • All Implemented Interfaces:

    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. This also makes use of the OperationQueue to do more intelligent handling of cascade delete when elements are removed from Collections, checking if it is later added to a different collection.
    • Constructor Detail

      • FlushNonReferential

        public FlushNonReferential()
    • Method Detail

      • 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
        opsToFlush - The ObjectProviders to process
        ec - ExecutionContext
        Any optimistic verification exceptions thrown during flush