code: void preQueryIndex(final ZoneIndex index, final QueryHandler complete) {
          if (index == null) {
              complete.onFailure(ResponseInfo.InvalidToken);
              return;
          }
          ZoneInfo info = zones.get(index);
          if (info != null) {
              complete.onSuccess();
              return;
          }
  
          getZoneJsonAsync(index, new CompletionHandler() {
              @Override
              public void complete(ResponseInfo info, JSONObject response) {
                  if (info.isOK() && response != null) {
                      try {
                          ZoneInfo info2 = ZoneInfo.buildFromJson(response);
                          zones.put(index, info2);
                          complete.onSuccess();
                          return;
                      } catch (JSONException e) {
                          e.printStackTrace();
                          complete.onFailure(ResponseInfo.NetworkError);
                          return;
                      }
                  }
                  complete.onFailure(info.statusCode);
              }
          });
      }
docs: async