|
||||||||||
| 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 |
getMaxWriteReenterants()
Returns the maximum number of write() method reenterants 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 |
setMaxWriteReenterants(int maxWriteReenterants)
Sets the maximum number of write() method reenterants a thread is allowed to made. |
GrizzlyFuture<WriteResult<Buffer,SocketAddress>> |
write(Connection connection,
SocketAddress dstAddress,
Buffer buffer,
CompletionHandler<WriteResult<Buffer,SocketAddress>> completionHandler,
Interceptor<WriteResult<Buffer,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,SocketAddress>> write(Connection connection,
SocketAddress dstAddress,
Buffer buffer,
CompletionHandler<WriteResult<Buffer,SocketAddress>> completionHandler,
Interceptor<WriteResult<Buffer,SocketAddress>> interceptor,
MessageCloner<Buffer> cloner)
throws 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
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 pending writes that may be
queued for a particular Connectionint getMaxPendingBytesPerConnection()
Connection.int getMaxWriteReenterants()
void setMaxWriteReenterants(int maxWriteReenterants)
maxWriteReenterants - the maximum number of write() method
reenterants a thread is allowed to made.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||