java - Searching strategy in an infinte list -


I am listening to a third party web-service, when the service begins, I get a stream of goods That is what I am receiving. I have to find a specific object within the amount of time and some processing should be done if the object has been found or an error has been placed in any of the following situations:

  1. Web service stops And I object is not found
  2. My timer has expired
  3. Any other wrong status

I am wondering what is the best way to search for the object that I am searching for an infinite list and the items in which they appear in the list are predicted Can not be done?

If the order can not be estimated, then there is no better than simply obtaining each object No way


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -