com.linkedin.parseq.Task.recover()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(185)

本文整理了Java中com.linkedin.parseq.Task.recover()方法的一些代码示例,展示了Task.recover()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Task.recover()方法的具体详情如下:
包路径:com.linkedin.parseq.Task
类名称:Task
方法名:recover

Task.recover介绍

[英]Equivalent to recover("recover", func).
[中]相当于recover(“recover”,func)。

代码示例

代码示例来源:origin: linkedin/parseq

/**
 * {@inheritDoc}
 */
@Override
default Tuple12Task<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> recover(final Function1<Throwable, Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>> f) {
 return cast(Task.super.recover(f));
}

代码示例来源:origin: linkedin/parseq

/**
 * {@inheritDoc}
 */
@Override
default Tuple5Task<T1, T2, T3, T4, T5> recover(final String desc, final Function1<Throwable, Tuple5<T1, T2, T3, T4, T5>> f) {
 return cast(Task.super.recover(desc, f));
}

代码示例来源:origin: linkedin/parseq

/**
 * {@inheritDoc}
 */
@Override
default Tuple10Task<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> recover(final String desc, final Function1<Throwable, Tuple10<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>> f) {
 return cast(Task.super.recover(desc, f));
}

代码示例来源:origin: linkedin/parseq

/**
 * {@inheritDoc}
 */
@Override
default Tuple14Task<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> recover(final String desc, final Function1<Throwable, Tuple14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>> f) {
 return cast(Task.super.recover(desc, f));
}

代码示例来源:origin: linkedin/parseq

/**
 * {@inheritDoc}
 */
@Override
default Tuple12Task<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> recover(final String desc, final Function1<Throwable, Tuple12<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>> f) {
 return cast(Task.super.recover(desc, f));
}

代码示例来源:origin: linkedin/parseq

/**
 * {@inheritDoc}
 */
@Override
default Tuple11Task<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> recover(final String desc, final Function1<Throwable, Tuple11<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>> f) {
 return cast(Task.super.recover(desc, f));
}

代码示例来源:origin: linkedin/parseq

/**
 * {@inheritDoc}
 */
@Override
default Tuple15Task<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> recover(final Function1<Throwable, Tuple15<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>> f) {
 return cast(Task.super.recover(f));
}

代码示例来源:origin: linkedin/parseq

/**
 * {@inheritDoc}
 */
@Override
default Tuple8Task<T1, T2, T3, T4, T5, T6, T7, T8> recover(final String desc, final Function1<Throwable, Tuple8<T1, T2, T3, T4, T5, T6, T7, T8>> f) {
 return cast(Task.super.recover(desc, f));
}

代码示例来源:origin: linkedin/parseq

/**
 * {@inheritDoc}
 */
@Override
default Tuple3Task<T1, T2, T3> recover(final String desc, final Function1<Throwable, Tuple3<T1, T2, T3>> f) {
 return cast(Task.super.recover(desc, f));
}

代码示例来源:origin: linkedin/parseq

/**
 * {@inheritDoc}
 */
@Override
default Tuple2Task<T1, T2> recover(final Function1<Throwable, Tuple2<T1, T2>> f) {
 return cast(Task.super.recover(f));
}

代码示例来源:origin: linkedin/parseq

/**
 * {@inheritDoc}
 */
@Override
default Tuple4Task<T1, T2, T3, T4> recover(final String desc, final Function1<Throwable, Tuple4<T1, T2, T3, T4>> f) {
 return cast(Task.super.recover(desc, f));
}

代码示例来源:origin: linkedin/parseq

/**
 * {@inheritDoc}
 */
@Override
default Tuple9Task<T1, T2, T3, T4, T5, T6, T7, T8, T9> recover(final Function1<Throwable, Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9>> f) {
 return cast(Task.super.recover(f));
}

代码示例来源:origin: linkedin/parseq

/**
 * {@inheritDoc}
 */
@Override
default Tuple2Task<T1, T2> recover(final String desc, final Function1<Throwable, Tuple2<T1, T2>> f) {
 return cast(Task.super.recover(desc, f));
}

代码示例来源:origin: linkedin/parseq

/**
 * {@inheritDoc}
 */
@Override
default Tuple7Task<T1, T2, T3, T4, T5, T6, T7> recover(final String desc, final Function1<Throwable, Tuple7<T1, T2, T3, T4, T5, T6, T7>> f) {
 return cast(Task.super.recover(desc, f));
}

代码示例来源:origin: linkedin/parseq

/**
 * {@inheritDoc}
 */
@Override
default Tuple5Task<T1, T2, T3, T4, T5> recover(final Function1<Throwable, Tuple5<T1, T2, T3, T4, T5>> f) {
 return cast(Task.super.recover(f));
}

代码示例来源:origin: linkedin/parseq

/**
 * {@inheritDoc}
 */
@Override
default Tuple3Task<T1, T2, T3> recover(final Function1<Throwable, Tuple3<T1, T2, T3>> f) {
 return cast(Task.super.recover(f));
}

代码示例来源:origin: linkedin/parseq

/**
 * {@inheritDoc}
 */
@Override
default Tuple6Task<T1, T2, T3, T4, T5, T6> recover(final String desc, final Function1<Throwable, Tuple6<T1, T2, T3, T4, T5, T6>> f) {
 return cast(Task.super.recover(desc, f));
}

代码示例来源:origin: linkedin/parseq

/**
 * {@inheritDoc}
 */
@Override
default Tuple7Task<T1, T2, T3, T4, T5, T6, T7> recover(final Function1<Throwable, Tuple7<T1, T2, T3, T4, T5, T6, T7>> f) {
 return cast(Task.super.recover(f));
}

代码示例来源:origin: linkedin/parseq

/**
 * {@inheritDoc}
 */
@Override
default Tuple4Task<T1, T2, T3, T4> recover(final Function1<Throwable, Tuple4<T1, T2, T3, T4>> f) {
 return cast(Task.super.recover(f));
}

代码示例来源:origin: linkedin/parseq

@Test
public void testGetRequestsWithError() {
 Task<String> task = Task.par(toMessage(greetingGet(1L)), toMessage(greetingGet(-1L)).recover(e -> "failed"))
   .map("combine", (x, y) -> x + y);
 runAndWait(getTestClassName() + ".testGetRequestsWithError", task);
 assertEquals(task.get(), "Good morning!failed");
 if (expectBatching()) {
  assertTrue(hasTask("greetings batch_get(reqs: 2, ids: 2)", task.getTrace()));
 } else {
  assertFalse(hasTask("greetings batch_get(reqs: 2, ids: 2)", task.getTrace()));
 }
}

相关文章