hollow/src/main/java/com/netflix/hollow/core/write/HollowBlobWriter.java
public void writeDelta(OutputStream os) throws IOException {
        stateEngine.prepareForWrite();
        
        if(stateEngine.isRestored())
            stateEngine.ensureAllNecessaryStatesRestored();

        List<HollowSchema> changedTypes = changedTypes();
        
        DataOutputStream dos = new DataOutputStream(os);
        writeHeader(dos, changedTypes, false);

        VarInt.writeVInt(dos, changedTypes.size());

        SimultaneousExecutor executor = new SimultaneousExecutor(getClass(), "write-delta");

        for(final HollowTypeWriteState typeState : stateEngine.getOrderedTypeStates()) {
            executor.execute(new Runnable() {
                public void run() {
                    if(typeState.hasChangedSinceLastCycle())
                        typeState.calculateDelta();
                }
            });
        }

        try {
            executor.awaitSuccessfulCompletion();
        } catch (Exception e) {
            throw new RuntimeException(e);
        }

        for(HollowTypeWriteState typeState : stateEngine.getOrderedTypeStates()) {
            if(typeState.hasChangedSinceLastCycle()) {
                HollowSchema schema = typeState.getSchema();
                schema.writeTo(dos);

                writeNumShards(dos, typeState.getNumShards());

                typeState.writeDelta(dos);
            }
        }
        os.flush();
    }
public void writeDelta(OutputStream os) throws IOException {
        stateEngine.prepareForWrite();
        
        if(stateEngine.isRestored())
            stateEngine.ensureAllNecessaryStatesRestored();

        List<HollowSchema> changedTypes = changedTypes();
        
        DataOutputStream dos = new DataOutputStream(os);
        writeHeader(dos, changedTypes, false);

        VarInt.writeVInt(dos, changedTypes.size());

        SimultaneousExecutor executor = new SimultaneousExecutor(getClass(), "write-delta");

        for(final HollowTypeWriteState typeState : stateEngine.getOrderedTypeStates()) {
            executor.execute(new Runnable() {
                public void run() {
                    if(typeState.hasChangedSinceLastCycle())
                        typeState.calculateDelta();
                }
            });
        }

        try {
            executor.awaitSuccessfulCompletion();
        } catch (Exception e) {
            throw new RuntimeException(e);
        }

        for(HollowTypeWriteState typeState : stateEngine.getOrderedTypeStates()) {
            if(typeState.hasChangedSinceLastCycle()) {
                HollowSchema schema = typeState.getSchema();
                schema.writeTo(dos);

                writeNumShards(dos, typeState.getNumShards());

                typeState.writeDelta(dos);
            }
        }
        os.flush();
    }
public void writeDelta ( OutputStream os ) throws IOException { stateEngine . prepareForWrite ( ) ; if ( stateEngine . isRestored ( ) ) stateEngine . ensureAllNecessaryStatesRestored ( ) ; List < HollowSchema > changedTypes = changedTypes ( ) ; DataOutputStream dos = new DataOutputStream ( os ) ; writeHeader ( dos , changedTypes , false ) ; VarInt . writeVInt ( dos , changedTypes . size ( ) ) ; SimultaneousExecutor executor = new SimultaneousExecutor ( getClass ( ) , "write-delta" ) ; for ( final HollowTypeWriteState typeState : stateEngine . getOrderedTypeStates ( ) ) { executor . execute ( new Runnable ( ) { public void run ( ) { if ( typeState . hasChangedSinceLastCycle ( ) ) typeState . calculateDelta ( ) ; } } ) ; } try { executor . awaitSuccessfulCompletion ( ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } for ( HollowTypeWriteState typeState : stateEngine . getOrderedTypeStates ( ) ) { if ( typeState . hasChangedSinceLastCycle ( ) ) { HollowSchema schema = typeState . getSchema ( ) ; schema . writeTo ( dos ) ; writeNumShards ( dos , typeState . getNumShards ( ) ) ; typeState . writeDelta ( dos ) ; } } os . flush ( ) ; }
Serialize the changes necessary to transition a consumer from the previous state
to the current state as a delta blob.

@param os the output stream to write the delta blob
@throws IOException if the delta blob could not be written
@throws IllegalStateException if the current state is restored from the previous state
and current state contains unrestored state for one or more types.  This indicates those
types have not been declared to the producer as part it's initialized data model.
@see com.netflix.hollow.api.producer.HollowProducer#initializeDataModel(Class[])
Serialize the changes necessary to transition a consumer from the previous state to the current state as a delta blob .