|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.asyncobjects.AsyncUnicastServer<O> net.sf.asyncobjects.io.BufferedOutput<D,O>
D
- a batched data typeO
- an output typepublic class BufferedOutput<D extends BatchedData<D>,O extends AOutput<D>>
Buffered output. The output waits util data will surpass specified limit, and
only after it it writes bulk of the data. The write to underlying stream
could be forced with AOutput.flush()
Constructor Summary | |
---|---|
BufferedOutput(O output,
int limit)
A constructor from stream and buffer size |
Method Summary | |
---|---|
Promise<Void> |
close()
register close request and possibly execute it. |
Promise<Void> |
flush()
Flush data in stream, upon return of this method all data will be written out to most underlying layer |
Promise<Void> |
write(D data)
write data |
Methods inherited from class net.sf.asyncobjects.AsyncUnicastServer |
---|
dereference, export, isImmediate, myVat, promise |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.asyncobjects.AsyncObject |
---|
dereference, isImmediate |
Constructor Detail |
---|
public BufferedOutput(O output, int limit)
output
- an underlying output streamlimit
- a limit, after limit is surpassed, data is sent to underlying
streamMethod Detail |
---|
public Promise<Void> write(D data)
write
in interface AOutput<D extends BatchedData<D>>
data
- data to write out
AOutput.write(BatchedData)
public Promise<Void> flush()
AOutput
flush
in interface AOutput<D extends BatchedData<D>>
AOutput.flush()
public Promise<Void> close()
close
in interface ACloseable
ACloseable.close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |