@Nonnull
@Override
public SingleSubscriptionBuilder<T> expireIf(@Nonnull BiPredicate<SingleSubscription<T>, T> predicate, @Nonnull ExpiryTestStage... testPoints) {
Preconditions.checkNotNull(testPoints, "testPoints");
Preconditions.checkNotNull(predicate, "predicate");
for (ExpiryTestStage testPoint : testPoints) {
switch (testPoint) {
case PRE:
preExpiryTests.add(predicate);
break;
case POST_FILTER:
midExpiryTests.add(predicate);
break;
case POST_HANDLE:
postExpiryTests.add(predicate);
break;
default:
throw new IllegalArgumentException("Unknown ExpiryTestPoint: " + testPoint);
}
}
return this;
}
SingleBuilder.java 文件源码
java
阅读 33
收藏 0
点赞 0
评论 0
项目:helper
作者:
评论列表
文章目录