public override async Task <string> RunResultAsRawJson(ReqlAst term, object globalOpts, CancellationToken cancelToken) { HostEntry host = GetRoundRobin(); try { return(await host.conn.RunResultAsRawJson(term, globalOpts, cancelToken).ConfigureAwait(false)); } catch (Exception e) when(ExceptionIs.NetworkError(e)) { host.MarkFailed(); throw; } }
public override void RunNoReply(ReqlAst term, object globalOpts) { HostEntry host = GetRoundRobin(); try { host.conn.RunNoReply(term, globalOpts); } catch (Exception e) when(ExceptionIs.NetworkError(e)) { host.MarkFailed(); throw; } }
public override void RunNoReply(ReqlAst term, object globalOpts) { HostEntry host = GetEpsilonGreedy(); try { var start = DateTime.Now.Ticks; host.conn.RunNoReply(term, globalOpts); var end = DateTime.Now.Ticks; MarkSuccess(host, start, end); } catch (Exception e) when(ExceptionIs.NetworkError(e)) { host.MarkFailed(); throw; } }
public override async Task <Cursor <T> > RunCursorAsync <T>(ReqlAst term, object globalOpts, CancellationToken cancelToken) { HostEntry host = GetEpsilonGreedy(); try { var start = DateTime.Now.Ticks; var result = await host.conn.RunCursorAsync <T>(term, globalOpts, cancelToken).ConfigureAwait(false); var end = DateTime.Now.Ticks; MarkSuccess(host, start, end); return(result); } catch (Exception e) when(ExceptionIs.NetworkError(e)) { host.MarkFailed(); throw; } }