private < T > KeyRange < T > allocate ( final IncompleteKey incompleteKey , final int num ) { final IncompleteKey [ ] allocations = new IncompleteKey [ num ] ; Arrays . fill ( allocations , incompleteKey ) ; final List < Key < T > > typedKeys = datastore ( ) . allocateId ( allocations ) . stream ( ) . map ( Key :: < T > create ) . collect ( Collectors . toList ( ) ) ; return new KeyRange <> ( typedKeys ) ; }
Allocate num copies of the incompleteKey