code: public boolean isReadyForNext() {
          if (objectMapper == null)
              objectMapper = new ObjectMapper();
  
          try {
              int masterStream = Integer.parseInt(ndarraySendUrl.split(":")[2]);
              SubscriberState subscriberState =
                              objectMapper.readValue(Unirest
                                              .get(String.format("http://%s:%d/state/%d", masterStatusHost,
                                                              masterStatusPort, masterStream))
                                              .asJson().getBody().toString(), SubscriberState.class);
              return subscriberState.isReady();
          } catch (Exception e) {
              e.printStackTrace();
          }
          return false;
      }
docs: Returns true if the client is
  ready for a next array or not
  @return true if the client is
  ready for the next array or not,false otherwise