private Queue < T > loadMorselQueue ( ) { Queue < T > morselQueue = createQueue ( ) ; //load morsels from state; Set < T > morsels = new LinkedHashSet <> ( this . stateManager . getMorsels ( ) ) ; morselQueue . addAll ( morsels ) ; if ( morselQueue . isEmpty ( ) ) { loadMorselQueueFromSource ( morselQueue ) ; } return morselQueue ; }
Loads the morsels from the persistent state if there are any ; otherwise it loads all other morsels based on on duplication policy manager .