ReadHandleFactory which allows to limit the number of messages read per read loop.
| Modifier and Type | Class and Description |
|---|---|
| protected abstract static class | MaxMessagesReadHandleFactory.MaxMessageReadHandle
Focuses on enforcing the maximum messages per read condition for |
| Modifier and Type | Field and Description |
|---|---|
| private final int |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public final ReadHandleFactory. | newHandle(Channel
the channel)Channel for which the ReadHandle is used.Implements io. Channel.
|
| protected abstract MaxMessagesReadHandleFactory. | Returns: the handle.the maximum number of messages to read per read loop. maxMessagesPerRead)Creates a new |
| maxMessagesPerRead | back to summary |
|---|---|
| private final int maxMessagesPerRead | |
| MaxMessagesReadHandleFactory | back to summary |
|---|---|
| protected MaxMessagesReadHandleFactory() | |
| MaxMessagesReadHandleFactory | back to summary |
|---|---|
| protected MaxMessagesReadHandleFactory(int maxMessagesPerRead) | |
| newHandle | back to summary |
|---|---|
| public final ReadHandleFactory. Implements io. Doc from io. Creates a new handle for the given
| |
| newMaxMessageHandle | back to summary |
|---|---|
| protected abstract MaxMessagesReadHandleFactory. Creates a new
| |
lastRead(int, int, int).
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private int |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | lastRead(int
The number of bytes the read operation did attempt to read. attemptedBytesRead, int The number of bytes from the previous read operation. This may be negative if a
read error occurs. actualBytesRead, int The number of messages read. numMessagesRead)Implements io. ReadHandle of the last read operation and its result.
|
| public void | readComplete()
Implements io. |
| maxMessagesPerRead | back to summary |
|---|---|
| private final int maxMessagesPerRead | |
| totalMessages | back to summary |
|---|---|
| private int totalMessages | |
| MaxMessageReadHandle | back to summary |
|---|---|
| protected MaxMessageReadHandle(int maxMessagesPerRead) | |
| lastRead | back to summary |
|---|---|
| public boolean lastRead(int attemptedBytesRead, int actualBytesRead, int numMessagesRead) Implements io. Doc from io. Notify the
| |
| readComplete | back to summary |
|---|---|
| public void readComplete() Implements io. Doc from io. Method that must be called once the read loop was completed.
| |