Executar solicitação http em paralelo com o Retrofit 2
Desejo implementar várias solicitações paralelas no Retrofit 2. Tenho a seguinte estrutura para fazer 3 solicitações:
HistoricalRApi.IStockChart service=HistoricalRApi.getMyApiService();
//^BVSP,^DJI,^IXIC
Call<HistoricalDataResponseTimestamp> call1= service.get1DHistoricalDataByStock("^IXIC");
Call<HistoricalDataResponseTimestamp> call2= service.get1DHistoricalDataByStock("^DJI");
Call<HistoricalDataResponseTimestamp> call3= service.get1DHistoricalDataByStock("^GSPC");
call1.enqueue(retrofitCallbackAmerica());
call2.enqueue(retrofitCallbackAmerica());
call3.enqueue(retrofitCallbackAmerica());
}
Eu li que no Retrofit1, ao definir o adaptador restante, pode-se definir uma solicitação paralela com .setExecutor, como aqui:
RestAdapter adapter = new RestAdapter.Builder()
.setEndpoint(END_POINT)
.setLogLevel(RestAdapter.LogLevel.FULL)
.setExecutors(Executors.newFixedThreadPool(3), null)
.build();
Minha pergunta é como posso obter o mesmo no Retrofit 2? desde já, obrigado