public class FutureAppendableAdapter extends Object implements FutureAppendable
Constructor and Description |
---|
FutureAppendableAdapter(Appendable out) |
Modifier and Type | Method and Description |
---|---|
FutureAppendable |
enqueueAppend(Future<CharSequence> csq)
Queue the Future<CharSequence> for append in this FutureAppendable.
|
boolean |
hasPending()
Check if some append operations are still waiting for
FutureAppendable.performAppends() to be called. |
FutureAppendable |
performAppends()
Wait for all computation to complete and perform the pending append operations.
|
FutureAppendable |
performAppends(int timeout,
TimeUnit unit)
Wait for all computation to complete and perform the pending append operations.
|
public FutureAppendableAdapter(Appendable out)
public FutureAppendable enqueueAppend(Future<CharSequence> csq)
FutureAppendable
Caller may start computing the content of the Future parameter before or after calling this method (using other Thread) or simply wait for Future#get() to be called (deferred computation).
enqueueAppend
in interface FutureAppendable
csq
- The Future character sequence to append. If csq is null, then the four characters
"null" are appended to this FutureAppendable.public FutureAppendable performAppends(int timeout, TimeUnit unit) throws IOException, HttpErrorPage, TimeoutException
FutureAppendable
performAppends
in interface FutureAppendable
IOException
HttpErrorPage
TimeoutException
public boolean hasPending()
FutureAppendable
FutureAppendable.performAppends()
to be called.hasPending
in interface FutureAppendable
public FutureAppendable performAppends() throws IOException, HttpErrorPage
FutureAppendable
performAppends
in interface FutureAppendable
IOException
HttpErrorPage
Copyright © 2008–2018. All rights reserved.