HHH-14248 Refactor latestBatches from InsertActionSorter's field to temporary variable in its sort method
This commit is contained in:
parent
112d215371
commit
c3e43ecd11
|
@ -1129,9 +1129,6 @@ public class ActionQueue {
|
|||
}
|
||||
}
|
||||
|
||||
// the mapping of entity names to their latest batch numbers.
|
||||
private List<BatchIdentifier> latestBatches;
|
||||
|
||||
// the map of batch numbers to EntityInsertAction lists
|
||||
private Map<BatchIdentifier, List<AbstractEntityInsertAction>> actionBatches;
|
||||
|
||||
|
@ -1143,9 +1140,11 @@ public class ActionQueue {
|
|||
*/
|
||||
public void sort(List<AbstractEntityInsertAction> insertions) {
|
||||
// optimize the hash size to eliminate a rehash.
|
||||
this.latestBatches = new ArrayList<>( );
|
||||
this.actionBatches = new HashMap<>();
|
||||
|
||||
// the mapping of entity names to their latest batch numbers.
|
||||
final List<BatchIdentifier> latestBatches = new ArrayList<>();
|
||||
|
||||
for ( AbstractEntityInsertAction action : insertions ) {
|
||||
BatchIdentifier batchIdentifier = new BatchIdentifier(
|
||||
action.getEntityName(),
|
||||
|
|
Loading…
Reference in New Issue