This method is called by the client to load the most recent list of resources.
This method should only be called by the service client.

@param result the most recent list of resources.
346858
public void load(List<E> result) {
        ++pageCount;
        if (this.result == null || this.result.isEmpty()) {
            this.result = result;
        } else {
            this.result.addAll(result);
        }
    }
970728
public static void validateResults(Map<Integer, Object> results) {
        for (Object result : results.values()) {
            if (result != null && result instanceof CacheClearResponse) {
                Object response = ((CacheClearResponse) result).getResponse();
                if (response instanceof Throwable) {
                    ExceptionUtil.sneakyThrow((Throwable) response);
                }
            }
        }
    }
242214
protected void processProjectListItem(Map<Integer, String> result, Row row)
   {
      Integer id = row.getInteger("PROJ_ID");
      String name = row.getString("PROJ_NAME");
      result.put(id, name);
   }
355721
public void getResult (ResultListener<T> rl)
    {
        if (_error != null) {
            rl.requestFailed(_error);
        } else if (_list == null) { // _list == null when we have a result
            rl.requestCompleted(_result);
        } else {
            _list.add(rl);
        }
    }
1305192
@Override
  public FutureResultImpl<T> setResult(T result) {
    this.result = result;
    succeeded = true;
    checkCallHandler();
    return this;
  }
134421
@Override
    public IPromise<T> onResult(Consumer<T> resultHandler) {
        if (realCallback instanceof IPromise == false)
            throw new RuntimeException("this is an error.");
        else
            return ((IPromise)realCallback).onResult(resultHandler);
    }
1343668
public <T> void spliterator(Spliterator<T> s, ResultStream<T> result)
  {
    ArrayList<Spliterator<T>> splits = new ArrayList<>();
    
    splits.add(s);
    
    int count = 2 * getTaskManager().getWorkers();
    split(splits, count);
    
    int size = splits.size();
    
    if (size == 1) {
      getTaskManager().run(new ComputeTask<T>(splits.get(0), result));
      // _workers.compute(splits.get(0), new ResultSinkWrapper<T>(result));
      return;
    }

    /*
    if (true) {
      throw new UnsupportedOperationException(L.l("fork unsupported for {0}", result));
    }
    */
    
    ServiceRefAmp serviceRef = ServiceRefAmp.current();
    
    //ResultStreamAmp<T> resultAmp = (ResultStreamAmp<T>) result;
    
    ResultStreamJoin<T> join = new ResultStreamJoin<T>(result, serviceRef.inbox());
    for (int i = 0; i < size; i++) {
      //resultSinkFork[i].begin(0);
      //_workers.compute(splits.get(i), new ResultSinkWrapper<T>(resultSinkFork[i]));
      
      getTaskManager().run(new ComputeTask<T>(splits.get(i), join.fork()));
    }
    
    join.ok();
  }
1018348
public static ArrayList<ResultsPartition> get(CaptureSearchResults results,
			WaybackRequest wbRequest) {
		return get(results, wbRequest, null);
	}
1007881
@Override
    public IPromise<T> onResult(Consumer<T> resultHandler) {
        return then( (r,e) -> {
            if ( e == null ) {
                resultHandler.accept((T) r);
            }
        });
    }
202464
@Override
    public void onResponse(ReadResultSet<ReliableTopicMessage> result) {
        // we process all messages in batch. So we don't release the thread and reschedule ourselves;
        // but we'll process whatever was received in 1 go.
        for (Object item : result) {
            ReliableTopicMessage message = (ReliableTopicMessage) item;

            if (cancelled) {
                return;
            }

            try {
                listener.storeSequence(sequence);
                process(message);
            } catch (Throwable t) {
                if (terminate(t)) {
                    cancel();
                    return;
                }
            }

            sequence++;
        }
        next();
    }
896163
public void dumpRequest(Map<String, Object> result) {
        if(!dumpConfig.isRequestEnabled()) { return; }

        Map<String, Object> requestResult = new LinkedHashMap<>();
        for(IRequestDumpable dumper: dumperFactory.createRequestDumpers(dumpConfig, exchange)) {
            if(dumper.isApplicableForRequest()){
                dumper.dumpRequest(requestResult);
            }
        }
        result.put(DumpConstants.REQUEST, requestResult);
    }
677990
protected void processResult(RO result) {
        for (ResultHandler<RO> resultHandler : resultHandlers) {
            resultHandler.handleResult(result);
        }
    }
662397
@Override
    public IPromise<T> then(Runnable result) {
        return then( (r,e) -> result.run() );
    }
118010
private synchronized boolean loadNextResults() {
        if ( atEndOfResults() )
            return false;

        do {
            nextResults.addAll(fetchNextPage());
        } while ( !atEndOfResults() && nextResults.isEmpty() );

        return !nextResults.isEmpty();
    }
670117
public void requestCompleted (final T result)
    {
        EventQueue.invokeLater(new Runnable() {
            public void run () {
                _target.requestCompleted(result);
            }
        });
    }
1369827
@Override
  public ResultStream<T> createMapSelf(ResultStream<? super T> result)
  {
    return new ResultStreamServicePrefetch<>(result, _prefetch);
  }
725180
public void resetResult(Object result)
  {

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "resetResult");

    if (result != null)
       ((TopicAclTraversalResults) result).reset();
    //   ((ArrayList) result).clear();

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "resetResult");

  }