I am calling a method in which there is loop which will end only if it find some results otherwise it keeps on looping until it find
public Collection<Serializable> searchItems(Collection<String> tags) {
Collection<Serializable> answers = (Collection<Serializable>)
this.issueParallelOperation(tags, RemoteOperation.getIndex,
null, null, null, null, AggregationStrategy.joinCollection);
}
The code inside the method this.issueParallelOperation() keeps on looping until it find the result. I want to stop the operation after 1 min and set the answers value manually like null. I cant make changes inside this.issueParallelOperation() method as it is called by many other methods. Can anyone please suggest me some ideas how to solve this issue in this searchItems() method