- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.metamx.common.guava.Yielder.isDone()
方法的一些代码示例,展示了Yielder.isDone()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Yielder.isDone()
方法的具体详情如下:
包路径:com.metamx.common.guava.Yielder
类名称:Yielder
方法名:isDone
[英]Returns true if this is the last Yielder in the chain. A Yielder that isDone() may return anything from both get() and next(), there is no contract and depending on those return values will likely lead to bugs. It will probably break your code to call next() on a Yielder that is done and expect something good from it. Once next() is called on this Yielder object, all further operations on this object are undefined.
[中]如果这是链中的最后一个Yielder,则返回true。如果isDone()可能同时返回get()和next()中的任何内容,则没有约定,根据这些返回值可能会导致错误。在一个已经完成的任务上调用next()可能会破坏您的代码,并期望从中获得一些好处。在这个对象上调用next()后,这个对象上的所有后续操作都将被取消定义。
代码示例来源:origin: metamx/java-util
@Override
public boolean isDone()
{
return baseYielder.isDone();
}
代码示例来源:origin: metamx/java-util
@Override
public boolean isDone()
{
return baseYielder.isDone();
}
代码示例来源:origin: com.metamx/java-util
@Override
public boolean isDone()
{
return baseYielder.isDone();
}
代码示例来源:origin: com.metamx/java-util
@Override
public boolean isDone()
{
return baseYielder.isDone();
}
代码示例来源:origin: metamx/java-util
@Override
public boolean isDone()
{
return yielder.isDone();
}
代码示例来源:origin: com.metamx/java-util
@Override
public boolean isDone()
{
return yielder.isDone();
}
代码示例来源:origin: metamx/java-util
@Override
public boolean isDone()
{
return !accumulator.didSomething() || yielder.isDone();
}
代码示例来源:origin: com.metamx/java-util
@Override
public boolean isDone()
{
return !accumulator.didSomething() || yielder.isDone();
}
代码示例来源:origin: com.metamx/java-util
@Override
public PriorityQueue<Yielder<T>> accumulate(PriorityQueue<Yielder<T>> queue, Sequence<T> in)
{
final Yielder<T> yielder = in.toYielder(
null,
new YieldingAccumulator<T, T>()
{
@Override
public T accumulate(T accumulated, T in)
{
yield();
return in;
}
}
);
if (!yielder.isDone()) {
queue.add(yielder);
} else {
try {
yielder.close();
}
catch (IOException e) {
throw Throwables.propagate(e);
}
}
return queue;
}
}
代码示例来源:origin: metamx/java-util
@Override
public PriorityQueue<Yielder<T>> accumulate(PriorityQueue<Yielder<T>> queue, Sequence<T> in)
{
final Yielder<T> yielder = in.toYielder(
null,
new YieldingAccumulator<T, T>()
{
@Override
public T accumulate(T accumulated, T in)
{
yield();
return in;
}
}
);
if (!yielder.isDone()) {
queue.add(yielder);
} else {
try {
yielder.close();
}
catch (IOException e) {
throw Throwables.propagate(e);
}
}
return queue;
}
}
代码示例来源:origin: com.n3twork.druid/druid-common
@Override
public <OutType> Yielder<OutType> toYielder(OutType initValue, final YieldingAccumulator<OutType, T> accumulator)
{
final CombiningYieldingAccumulator<OutType, T> combiningAccumulator = new CombiningYieldingAccumulator<OutType, T>(
ordering, mergeFn, accumulator
);
Yielder<T> baseYielder = baseSequence.toYielder(null, combiningAccumulator);
if (baseYielder.isDone()) {
return Yielders.done(initValue, baseYielder);
}
return makeYielder(baseYielder, combiningAccumulator);
}
代码示例来源:origin: com.n3twork.druid/druid-common
@Override
public Yielder<T> accumulate(Yielder<T> accumulated, Sequence<T> in)
{
final Yielder<T> retVal = in.toYielder(
null,
new YieldingAccumulator<T, T>()
{
@Override
public T accumulate(T accumulated, T in)
{
yield();
return in;
}
}
);
if (retVal.isDone()) {
try {
retVal.close();
}
catch (IOException e) {
throw Throwables.propagate(e);
}
return null;
}
else {
yield();
}
return retVal;
}
}
代码示例来源:origin: metamx/java-util
retVal = accumulator.accumulate(retVal, yielder.get());
yielder = yielder.next(null);
if (yielder.isDone()) {
try {
yielder.close();
代码示例来源:origin: com.metamx/java-util
retVal = accumulator.accumulate(retVal, yielder.get());
yielder = yielder.next(null);
if (yielder.isDone()) {
try {
yielder.close();
代码示例来源:origin: com.metamx/java-util
public <OutType> Yielder<OutType> makeYielder(
Yielder<Sequence<T>> yielderYielder,
OutType initValue,
YieldingAccumulator<OutType, T> accumulator
)
{
if (yielderYielder.isDone()) {
return Yielders.done(initValue, yielderYielder);
}
while (!yielderYielder.isDone()) {
Yielder<OutType> yielder = yielderYielder.get().toYielder(initValue, accumulator);
if (accumulator.yielded()) {
return wrapYielder(yielder, yielderYielder, accumulator);
}
initValue = yielder.get();
try {
yielder.close();
}
catch (IOException e) {
throw Throwables.propagate(e);
}
yielderYielder = yielderYielder.next(null);
}
return Yielders.done(initValue, yielderYielder);
}
代码示例来源:origin: metamx/java-util
public <OutType> Yielder<OutType> makeYielder(
Yielder<Sequence<T>> yielderYielder,
OutType initValue,
YieldingAccumulator<OutType, T> accumulator
)
{
if (yielderYielder.isDone()) {
return Yielders.done(initValue, yielderYielder);
}
while (!yielderYielder.isDone()) {
Yielder<OutType> yielder = yielderYielder.get().toYielder(initValue, accumulator);
if (accumulator.yielded()) {
return wrapYielder(yielder, yielderYielder, accumulator);
}
initValue = yielder.get();
try {
yielder.close();
}
catch (IOException e) {
throw Throwables.propagate(e);
}
yielderYielder = yielderYielder.next(null);
}
return Yielders.done(initValue, yielderYielder);
}
代码示例来源:origin: com.n3twork.druid/druid-common
while (!accumulator.yielded() && (!pQueue.isEmpty() || !oldDudeAtCrosswalk.isDone())) {
Yielder<T> yielder;
if (oldDudeAtCrosswalk.isDone()) {
yielder = pQueue.remove();
if (yielder.isDone()) {
try {
yielder.close();
代码示例来源:origin: com.n3twork.druid/druid-common
@Override
public Yielder<OutType> next(OutType outType)
{
T nextIn = yielder.get();
combiningAccumulator.setRetVal(outType);
final Yielder<T> baseYielder = yielder.next(nextIn);
if (baseYielder.isDone()) {
final OutType outValue = combiningAccumulator.getAccumulator().accumulate(outType, baseYielder.get());
return Yielders.done(outValue, baseYielder);
}
return makeYielder(baseYielder, combiningAccumulator);
}
代码示例来源:origin: metamx/java-util
Assert.assertFalse(prefix, yielder.isDone());
Assert.assertEquals(prefix, expectedSum, yielder.get().intValue());
Assert.assertTrue(prefix, yielder.isDone());
yielder.close();
代码示例来源:origin: metamx/java-util
while(!yielder.isDone()) {
result.add(yielder.get());
yielder = yielder.next(null);
这个问题不太可能帮助任何 future 的访客;它只与一个小地理区域、一个特定时刻或一个非常狭窄的情况相关,而这些情况通常不适用于互联网的全局受众。如需帮助使这个问题更广泛地适用,visit the
我有: data class Edge(val spec: String, val weight: Int) private val graph: SortedSetMultimap = TreeMu
鉴于使用以下代码创建的 Guava 缓存,如果未设置,是否有最大缓存大小? LoadingCache loadingCache = CacheBuilder.newBuilder().build(ne
我需要向 Guava Multimap 添加一个键,其中一个空集合作为值。我该如何做到这一点? 我试过这个: map.put( "my key", null ); 但是调用 get() 会返回一个包含
我刚刚遇到这样的代码: ExecutorService executorService = MoreExecutors.sameThreadExecutor(); for (int i = 0; i
我使用的是来自 Google Collections 的 com.google.common.collect.PrimitiveArrays,但是我在 Guava 中找不到它,是否已重命名?我在哪里可
当前,我正在使用以下代码在映射中创建过滤器以匹配并提供过滤后的结果集列表。 final Map filteredMap = Maps.filterKeys(mymap, Predicates.cont
当我在 app/build.gradle 中使用 implementation 'com.google.firebase:firebase-inappmessaging-display:17.2.0'
Google Guava Cache 文档指出: Refreshing is not quite the same as eviction. As specified in LoadingCache.
Guava 的 ImmutableList.Builder 的线程安全保证是什么? javadocs 没有说。 最佳答案 虽然 Guava Immutable 类是线程安全的,但它们的构建器不是。对于
目前我在我的应用程序中使用 guava EventBus 方法。监听器尝试做一些工作,如果失败,事件应该回到总线并重新发送。 我的问题是:如果我的应用程序出现故障(执行关闭)怎么办?它会在总线上发送剩
是否可以使用现有的 java 静态方法作为开箱即用的扩展? 让我们考虑 com.google.common.collect.Iterables.transform。现在,因为我不知道如何处理这个问题,
我想创建一个由 Guava 函数支持的只读 map 。我有一个提供值的函数,给定一个键。 Function f = new Function() { public Object apply(f
我最近将 Google Guava 作为库添加到我的 Eclipse 项目中(我从 http://code.google.com/p/guava-libraries/ 下载了“guava-16.0.j
我们最近从 Drools 5 升级到 Drools 6 并遇到了令人不安的冲突问题。 我们有kie-ci导入到项目中。 kie-ci引进 sisu-guava . sisu-guava改变了谷歌 Gu
尝试取消注册时,我在我的一个类(class)中收到以下错误。 java.lang.IllegalArgumentException: missing event handler for an anno
我的项目传递依赖于 Google Guava lib。突然(使用新版本的 Guava ?)应用程序在启动时崩溃java.lang.NoSuchMethodError: 'java.util.strea
我喜欢 Google Guava 并且经常使用它,但是我总是发现我在写一种方法。 public static T tryFind(Iterable iterable, Predicate pred
我使用的是普通的旧 Java 1.6,并且对这两个库都感兴趣。 阅读文档后,我不确定是否存在差异(如果有的话)。任何人都可以解释一下,或者指出一些相关信息吗?提前致谢! 最佳答案 RxJava 比 L
我用的是 Guava 17.0 private static final ConcurrentMap imageMap = new MapMaker().softValues().ma
我是一名优秀的程序员,十分优秀!