Class DefaultMaxMessagesRecvByteBufAllocator

    • Constructor Detail

      • DefaultMaxMessagesRecvByteBufAllocator

        public DefaultMaxMessagesRecvByteBufAllocator()
      • DefaultMaxMessagesRecvByteBufAllocator

        public DefaultMaxMessagesRecvByteBufAllocator​(int maxMessagesPerRead)
    • Method Detail

      • respectMaybeMoreData

        public DefaultMaxMessagesRecvByteBufAllocator respectMaybeMoreData​(boolean respectMaybeMoreData)
        Determine if future instances of RecvByteBufAllocator.newHandle() will stop reading if we think there is no more data.
        Parameters:
        respectMaybeMoreData -
        • true to stop reading if we think there is no more data. This may save a system call to read from the socket, but if data has arrived in a racy fashion we may give up our maxMessagesPerRead() quantum and have to wait for the selector to notify us of more data.
        • false to keep reading (up to maxMessagesPerRead()) or until there is no data when we attempt to read.
        Returns:
        this.
      • respectMaybeMoreData

        public final boolean respectMaybeMoreData()
        Get if future instances of RecvByteBufAllocator.newHandle() will stop reading if we think there is no more data.
        Returns:
        • true to stop reading if we think there is no more data. This may save a system call to read from the socket, but if data has arrived in a racy fashion we may give up our maxMessagesPerRead() quantum and have to wait for the selector to notify us of more data.
        • false to keep reading (up to maxMessagesPerRead()) or until there is no data when we attempt to read.