code: private void inflateBarriers(Collection<Barrier> barriers) {
      // Step 1. Build the set of keys corresponding to the slots.
      Set<Key> keySet = new HashSet<>(barriers.size() * 5);
      for (Barrier barrier : barriers) {
        for (Key key : barrier.getWaitingOnKeys()) {
          keySet.add(key);
        }
      }
      // Step 2. Query the datastore for the Slot entities
      Map<Key, Entity> entityMap = getEntities("inflateBarriers", keySet);
  
      // Step 3. Convert into map from key to Slot
      Map<Key, Slot> slotMap = new HashMap<>(entityMap.size());
      for (Key key : keySet) {
        Slot s = new Slot(entityMap.get(key));
        slotMap.put(key, s);
      }
      // Step 4. Inflate each of the barriers
      for (Barrier barrier : barriers) {
        barrier.inflate(slotMap);
      }
    }
docs: Given a {@link Collection} of {@link Barrier Barriers}, inflate each of the
  {@link Barrier Barriers} so that {@link Barrier#getWaitingOnInflated()}
  will not return null;
  
  @param barriers