protected JsonObject processQuery()

in src/main/java/org/apache/datasketches/server/UpdateHandler.java [73:94]


  protected JsonObject processQuery(final JsonObject query) {
    for (final Map.Entry<String, JsonElement> entry : query.entrySet()) {
      final String name = entry.getKey();
      final SketchStorage.SketchEntry se = sketches.getSketch(name);
      final JsonElement data = entry.getValue();

      if (name == null || se == null || data == null) {
        throw new IllegalArgumentException("Attempt to call update with missing name or sketch not found");
      }

      synchronized (name.intern()) {
        if (data.isJsonArray()) {
          processBatchUpdate(se, data.getAsJsonArray());
        } else {
          processSingleUpdate(se, data);
        }
      }
    }

    // nothing to return from update
    return null;
  }