public final class BigPipe extends Object
| Constructor and Description |
|---|
BigPipe() |
| Modifier and Type | Method and Description |
|---|---|
Iterable<KeyedValue<String,com.atlassian.json.marshal.Jsonable>> |
forceCompleteAll() |
Iterable<KeyedValue<String,com.atlassian.json.marshal.Jsonable>> |
getAvailableContent() |
boolean |
isComplete() |
BigPipe |
push(String key,
CompletionStage<com.atlassian.json.marshal.Jsonable> promise) |
Iterable<KeyedValue<String,com.atlassian.json.marshal.Jsonable>> |
waitForContent()
Waits for content.
|
Iterable<KeyedValue<String,com.atlassian.json.marshal.Jsonable>> |
waitForContent(long timeout,
TimeUnit unit)
Waits for content.
|
public BigPipe push(String key, CompletionStage<com.atlassian.json.marshal.Jsonable> promise)
public Iterable<KeyedValue<String,com.atlassian.json.marshal.Jsonable>> getAvailableContent()
public Iterable<KeyedValue<String,com.atlassian.json.marshal.Jsonable>> forceCompleteAll()
@ExperimentalApi public Iterable<KeyedValue<String,com.atlassian.json.marshal.Jsonable>> waitForContent() throws InterruptedException
If any content is available, this method returns immediately. If content is not available, it blocks until any content becomes available. Warning: This function doesn't contain any timeout - may be dangerous to those who create 'promises without future'. Always make sure that your promises are being executed when using this function. Experimental: Currently function only waits if there are any pending tasks, it may change in the future.
InterruptedException - if interrupted while executingpublic Iterable<KeyedValue<String,com.atlassian.json.marshal.Jsonable>> waitForContent(long timeout, TimeUnit unit) throws InterruptedException
If any content is available, this method returns immediately. If content is not available, it blocks until any content becomes available.
timeout - how long to wait before giving up, in units of unitunit - a TimeUnit determining how to interpret the timeout parameterInterruptedException - if interrupted while executingpublic boolean isComplete()
Copyright © 2019 Atlassian. All rights reserved.