|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AsyncQueueWriter<L>
The AsyncQueue, which implements asynchronous write queue.
| Method Summary | |
|---|---|
boolean |
canWrite(Connection connection,
int size)
|
int |
getMaxPendingBytesPerConnection()
|
int |
getMaxWriteReentrants()
Returns the maximum number of write() method reentrants a thread is allowed to made. |
void |
setMaxPendingBytesPerConnection(int maxQueuedWrites)
Configures the maximum number of bytes pending to be written for a particular Connection. |
void |
setMaxWriteReentrants(int maxWriteReentrants)
Sets the maximum number of write() method reentrants a thread is allowed to made. |
GrizzlyFuture<WriteResult<Buffer,java.net.SocketAddress>> |
write(Connection connection,
java.net.SocketAddress dstAddress,
Buffer buffer,
CompletionHandler<WriteResult<Buffer,java.net.SocketAddress>> completionHandler,
Interceptor<WriteResult<Buffer,java.net.SocketAddress>> interceptor,
MessageCloner<Buffer> cloner)
Method writes the Buffer to the specific address. |
| Methods inherited from interface org.glassfish.grizzly.Writer |
|---|
write, write, write, write, write |
| Methods inherited from interface org.glassfish.grizzly.asyncqueue.AsyncQueue |
|---|
close, isReady, onClose, processAsync |
| Method Detail |
|---|
GrizzlyFuture<WriteResult<Buffer,java.net.SocketAddress>> write(Connection connection,
java.net.SocketAddress dstAddress,
Buffer buffer,
CompletionHandler<WriteResult<Buffer,java.net.SocketAddress>> completionHandler,
Interceptor<WriteResult<Buffer,java.net.SocketAddress>> interceptor,
MessageCloner<Buffer> cloner)
throws java.io.IOException
Buffer to the specific address.
connection - the Connection to write todstAddress - the destination address the message will be
sent tobuffer - the Buffer from which the data will be writtencompletionHandler - CompletionHandler,
which will get notified, when write will be completedinterceptor - Interceptor, which will be able to intercept
control each time new portion of a data was written from a
buffer.
The interceptor can decide, whether asynchronous write is
completed or not, or provide other processing instructions.cloner - MessageCloner, which will be invoked by
AsyncQueueWriter, if message could not be written to a
channel directly and has to be put on a asynchronous queue
Future, using which it's possible to check the
result
java.io.IOException
boolean canWrite(Connection connection,
int size)
connection - the Connection to test whether or not the
specified number of bytes can be written to.size - number of bytes to write.
true if the queue has not exceeded it's maximum
size in bytes of pending writes, otherwise falsevoid setMaxPendingBytesPerConnection(int maxQueuedWrites)
Connection.
maxQueuedWrites - maximum number of bytes that may be pending to be
written to a particular Connection.int getMaxPendingBytesPerConnection()
Connection.int getMaxWriteReentrants()
void setMaxWriteReentrants(int maxWriteReentrants)
maxWriteReentrants - the maximum number of write() method calls
a thread is allowed to make.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||