GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Overview
  • Use
  • Tree
  • Deprecated
  • Index
  • Search
  • Help
  • io.netty.channel.kqueue
  • KQueueServerChannelConfig

This view

  • Original page
  • New address

GeezerVison is showing netty.io — KQueueServerChannelConfig (Netty API Reference (4.1.141.Final))

Class KQueueServerChannelConfig

java.lang.Object
io.netty.channel.DefaultChannelConfig
io.netty.channel.kqueue.KQueueChannelConfig
io.netty.channel.kqueue.KQueueServerChannelConfig
All Implemented Interfaces:
ChannelConfig, ServerSocketChannelConfig
Direct Known Subclasses:
KQueueServerSocketChannelConfig

public class KQueueServerChannelConfig extends KQueueChannelConfig implements ServerSocketChannelConfig
  • Field Summary

    Fields inherited from class DefaultChannelConfig

    channel
    Modifier and Type
    Field
    Description
    protected final Channel
    channel
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    getBacklog()
    Gets the backlog value to specify when the channel binds to a local address.
    <T> T
    getOption(ChannelOption<T> option)
    Return the value of the given ChannelOption
    Map<ChannelOption<?>, Object>
    getOptions()
    Return all set ChannelOption's.
    int
    getReceiveBufferSize()
    Gets the StandardSocketOptions.SO_RCVBUF option.
    boolean
    isReuseAddress()
    Gets the StandardSocketOptions.SO_REUSEADDR option.
    boolean
    isTcpFastOpen()
    Returns true if TCP FastOpen is enabled.
    KQueueServerChannelConfig
    setAllocator(ByteBufAllocator allocator)
    Set the ByteBufAllocator which is used for the channel to allocate buffers.
    KQueueServerChannelConfig
    setAutoRead(boolean autoRead)
    Sets if ChannelHandlerContext.read() will be invoked automatically so that a user application doesn't need to call it at all.
    KQueueServerChannelConfig
    setBacklog(int backlog)
    Sets the backlog value to specify when the channel binds to a local address.
    KQueueServerChannelConfig
    setConnectTimeoutMillis(int connectTimeoutMillis)
    Sets the connect timeout of the channel in milliseconds.
    KQueueServerChannelConfig
    setMaxMessagesPerRead(int maxMessagesPerRead)
    Deprecated.
    KQueueServerChannelConfig
    setMessageSizeEstimator(MessageSizeEstimator estimator)
    Set the MessageSizeEstimator which is used for the channel to detect the size of a message.
    <T> boolean
    setOption(ChannelOption<T> option, T value)
    Sets a configuration property with the specified name and value.
    KQueueServerChannelConfig
    setPerformancePreferences(int connectionTime, int latency, int bandwidth)
    Sets the performance preferences as specified in ServerSocket.setPerformancePreferences(int, int, int).
    KQueueServerChannelConfig
    setRcvAllocTransportProvidesGuess(boolean transportProvidesGuess)
    If this is true then the RecvByteBufAllocator.Handle.guess() will be overridden to always attempt to read as many bytes as kqueue says are available.
    KQueueServerChannelConfig
    setReceiveBufferSize(int receiveBufferSize)
    Gets the StandardSocketOptions.SO_SNDBUF option.
    KQueueServerChannelConfig
    setRecvByteBufAllocator(RecvByteBufAllocator allocator)
    Set the RecvByteBufAllocator which is used for the channel to allocate receive buffers.
    KQueueServerChannelConfig
    setReuseAddress(boolean reuseAddress)
    Sets the StandardSocketOptions.SO_REUSEADDR option.
    KQueueServerChannelConfig
    setTcpFastOpen(boolean enableTcpFastOpen)
    Enables TCP FastOpen on the server channel.
    KQueueServerChannelConfig
    setWriteBufferHighWaterMark(int writeBufferHighWaterMark)
    Deprecated.
    KQueueServerChannelConfig
    setWriteBufferLowWaterMark(int writeBufferLowWaterMark)
    Deprecated.
    KQueueServerChannelConfig
    setWriteBufferWaterMark(WriteBufferWaterMark writeBufferWaterMark)
    Set the WriteBufferWaterMark which is used for setting the high and low water mark of the write buffer.
    KQueueServerChannelConfig
    setWriteSpinCount(int writeSpinCount)
    Sets the maximum loop count for a write operation until WritableByteChannel.write(ByteBuffer) returns a non-zero value.

    Methods inherited from class KQueueChannelConfig

    autoReadCleared, getRcvAllocTransportProvidesGuess
    Modifier and Type
    Method
    Description
    protected final void
    autoReadCleared()
    Is called once DefaultChannelConfig.setAutoRead(boolean) is called with false and DefaultChannelConfig.isAutoRead() was true before.
    boolean
    getRcvAllocTransportProvidesGuess()
    Deprecated.
    will be removed and is ignored.

    Methods inherited from class DefaultChannelConfig

    getAllocator, getConnectTimeoutMillis, getMaxMessagesPerRead, getMaxMessagesPerWrite, getMessageSizeEstimator, getOptions, getRecvByteBufAllocator, getWriteBufferHighWaterMark, getWriteBufferLowWaterMark, getWriteBufferWaterMark, getWriteSpinCount, isAutoClose, isAutoRead, setAutoClose, setMaxMessagesPerWrite, setOptions, validate
    Modifier and Type
    Method
    Description
    ByteBufAllocator
    getAllocator()
    Returns ByteBufAllocator which is used for the channel to allocate buffers.
    int
    getConnectTimeoutMillis()
    Returns the connect timeout of the channel in milliseconds.
    int
    getMaxMessagesPerRead()
    Deprecated.
    int
    getMaxMessagesPerWrite()
    Get the maximum number of message to write per eventloop run.
    MessageSizeEstimator
    getMessageSizeEstimator()
    Returns MessageSizeEstimator which is used for the channel to detect the size of a message.
    protected Map<ChannelOption<?>, Object>
    getOptions(Map<ChannelOption<?>, Object> result, ChannelOption<?>... options)
     
    <T extends RecvByteBufAllocator>
    T
    getRecvByteBufAllocator()
    Returns RecvByteBufAllocator which is used for the channel to allocate receive buffers.
    int
    getWriteBufferHighWaterMark()
    Returns the high water mark of the write buffer.
    int
    getWriteBufferLowWaterMark()
    Returns the low water mark of the write buffer.
    WriteBufferWaterMark
    getWriteBufferWaterMark()
    Returns the WriteBufferWaterMark which is used for setting the high and low water mark of the write buffer.
    int
    getWriteSpinCount()
    Returns the maximum loop count for a write operation until WritableByteChannel.write(ByteBuffer) returns a non-zero value.
    boolean
    isAutoClose()
    Returns true if and only if the Channel will be closed automatically and immediately on write failure.
    boolean
    isAutoRead()
    Returns true if and only if ChannelHandlerContext.read() will be invoked automatically so that a user application doesn't need to call it at all.
    ChannelConfig
    setAutoClose(boolean autoClose)
    Sets whether the Channel should be closed automatically and immediately on write failure.
    ChannelConfig
    setMaxMessagesPerWrite(int maxMessagesPerWrite)
    Set the maximum number of message to write per eventloop run.
    boolean
    setOptions(Map<ChannelOption<?>, ?> options)
    Sets the configuration properties from the specified Map.
    protected <T> void
    validate(ChannelOption<T> option, T value)
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getOptions

      public Map<ChannelOption<?>, Object> getOptions()
      Description copied from interface: ChannelConfig
      Return all set ChannelOption's.
      Specified by:
      getOptions in interface ChannelConfig
      Overrides:
      getOptions in class KQueueChannelConfig
    • getOption

      public <T> T getOption(ChannelOption<T> option)
      Description copied from interface: ChannelConfig
      Return the value of the given ChannelOption
      Specified by:
      getOption in interface ChannelConfig
      Overrides:
      getOption in class KQueueChannelConfig
    • setOption

      public <T> boolean setOption(ChannelOption<T> option, T value)
      Description copied from interface: ChannelConfig
      Sets a configuration property with the specified name and value. To override this method properly, you must call the super class:
      public boolean setOption(ChannelOption<T> option, T value) {
          if (super.setOption(option, value)) {
              return true;
          }
      
          if (option.equals(additionalOption)) {
              ....
              return true;
          }
      
          return false;
      }
      
      Specified by:
      setOption in interface ChannelConfig
      Overrides:
      setOption in class KQueueChannelConfig
      Returns:
      true if and only if the property has been set
    • isReuseAddress

      public boolean isReuseAddress()
      Description copied from interface: ServerSocketChannelConfig
      Gets the StandardSocketOptions.SO_REUSEADDR option.
      Specified by:
      isReuseAddress in interface ServerSocketChannelConfig
    • setReuseAddress

      public KQueueServerChannelConfig setReuseAddress(boolean reuseAddress)
      Description copied from interface: ServerSocketChannelConfig
      Sets the StandardSocketOptions.SO_REUSEADDR option.
      Specified by:
      setReuseAddress in interface ServerSocketChannelConfig
    • getReceiveBufferSize

      public int getReceiveBufferSize()
      Description copied from interface: ServerSocketChannelConfig
      Gets the StandardSocketOptions.SO_RCVBUF option.
      Specified by:
      getReceiveBufferSize in interface ServerSocketChannelConfig
    • setReceiveBufferSize

      public KQueueServerChannelConfig setReceiveBufferSize(int receiveBufferSize)
      Description copied from interface: ServerSocketChannelConfig
      Gets the StandardSocketOptions.SO_SNDBUF option.
      Specified by:
      setReceiveBufferSize in interface ServerSocketChannelConfig
    • getBacklog

      public int getBacklog()
      Description copied from interface: ServerSocketChannelConfig
      Gets the backlog value to specify when the channel binds to a local address.
      Specified by:
      getBacklog in interface ServerSocketChannelConfig
    • setBacklog

      public KQueueServerChannelConfig setBacklog(int backlog)
      Description copied from interface: ServerSocketChannelConfig
      Sets the backlog value to specify when the channel binds to a local address.
      Specified by:
      setBacklog in interface ServerSocketChannelConfig
    • isTcpFastOpen

      public boolean isTcpFastOpen()
      Returns true if TCP FastOpen is enabled.
      See Also:
      • RFC 7413 Passive Open
    • setTcpFastOpen

      public KQueueServerChannelConfig setTcpFastOpen(boolean enableTcpFastOpen)
      Enables TCP FastOpen on the server channel. If the underlying os doesn't support TCP_FASTOPEN setting this has no effect. This has to be set before doing listen on the socket otherwise this takes no effect.
      Parameters:
      enableTcpFastOpen - true if TCP FastOpen should be enabled for incoming connections.
      See Also:
      • RFC 7413 Passive Open
    • setRcvAllocTransportProvidesGuess

      public KQueueServerChannelConfig setRcvAllocTransportProvidesGuess(boolean transportProvidesGuess)
      Description copied from class: KQueueChannelConfig
      If this is true then the RecvByteBufAllocator.Handle.guess() will be overridden to always attempt to read as many bytes as kqueue says are available.
      Overrides:
      setRcvAllocTransportProvidesGuess in class KQueueChannelConfig
    • setPerformancePreferences

      public KQueueServerChannelConfig setPerformancePreferences(int connectionTime, int latency, int bandwidth)
      Description copied from interface: ServerSocketChannelConfig
      Sets the performance preferences as specified in ServerSocket.setPerformancePreferences(int, int, int).
      Specified by:
      setPerformancePreferences in interface ServerSocketChannelConfig
    • setConnectTimeoutMillis

      public KQueueServerChannelConfig setConnectTimeoutMillis(int connectTimeoutMillis)
      Description copied from interface: ChannelConfig
      Sets the connect timeout of the channel in milliseconds. If the Channel does not support connect operation, this property is not used at all, and therefore will be ignored.
      Specified by:
      setConnectTimeoutMillis in interface ChannelConfig
      Specified by:
      setConnectTimeoutMillis in interface ServerSocketChannelConfig
      Overrides:
      setConnectTimeoutMillis in class KQueueChannelConfig
      Parameters:
      connectTimeoutMillis - the connect timeout in milliseconds. 0 to disable.
    • setMaxMessagesPerRead

      @Deprecated public KQueueServerChannelConfig setMaxMessagesPerRead(int maxMessagesPerRead)
      Deprecated.
      Description copied from class: DefaultChannelConfig

      Specified by:
      setMaxMessagesPerRead in interface ChannelConfig
      Specified by:
      setMaxMessagesPerRead in interface ServerSocketChannelConfig
      Overrides:
      setMaxMessagesPerRead in class KQueueChannelConfig
    • setWriteSpinCount

      public KQueueServerChannelConfig setWriteSpinCount(int writeSpinCount)
      Description copied from interface: ChannelConfig
      Sets the maximum loop count for a write operation until WritableByteChannel.write(ByteBuffer) returns a non-zero value. It is similar to what a spin lock is used for in concurrency programming. It improves memory utilization and write throughput depending on the platform that JVM runs on. The default value is 16.
      Specified by:
      setWriteSpinCount in interface ChannelConfig
      Specified by:
      setWriteSpinCount in interface ServerSocketChannelConfig
      Overrides:
      setWriteSpinCount in class KQueueChannelConfig
    • setAllocator

      public KQueueServerChannelConfig setAllocator(ByteBufAllocator allocator)
      Description copied from interface: ChannelConfig
      Set the ByteBufAllocator which is used for the channel to allocate buffers.
      Specified by:
      setAllocator in interface ChannelConfig
      Specified by:
      setAllocator in interface ServerSocketChannelConfig
      Overrides:
      setAllocator in class KQueueChannelConfig
    • setRecvByteBufAllocator

      public KQueueServerChannelConfig setRecvByteBufAllocator(RecvByteBufAllocator allocator)
      Description copied from interface: ChannelConfig
      Set the RecvByteBufAllocator which is used for the channel to allocate receive buffers.
      Specified by:
      setRecvByteBufAllocator in interface ChannelConfig
      Specified by:
      setRecvByteBufAllocator in interface ServerSocketChannelConfig
      Overrides:
      setRecvByteBufAllocator in class KQueueChannelConfig
    • setAutoRead

      public KQueueServerChannelConfig setAutoRead(boolean autoRead)
      Description copied from interface: ChannelConfig
      Sets if ChannelHandlerContext.read() will be invoked automatically so that a user application doesn't need to call it at all. The default value is true.
      Specified by:
      setAutoRead in interface ChannelConfig
      Specified by:
      setAutoRead in interface ServerSocketChannelConfig
      Overrides:
      setAutoRead in class KQueueChannelConfig
    • setWriteBufferHighWaterMark

      @Deprecated public KQueueServerChannelConfig setWriteBufferHighWaterMark(int writeBufferHighWaterMark)
      Deprecated.
      Description copied from interface: ChannelConfig

      Sets the high water mark of the write buffer. If the number of bytes queued in the write buffer exceeds this value, Channel.isWritable() will start to return false.

      Specified by:
      setWriteBufferHighWaterMark in interface ChannelConfig
      Specified by:
      setWriteBufferHighWaterMark in interface ServerSocketChannelConfig
      Overrides:
      setWriteBufferHighWaterMark in class KQueueChannelConfig
    • setWriteBufferLowWaterMark

      @Deprecated public KQueueServerChannelConfig setWriteBufferLowWaterMark(int writeBufferLowWaterMark)
      Deprecated.
      Description copied from interface: ChannelConfig

      Sets the low water mark of the write buffer. Once the number of bytes queued in the write buffer exceeded the high water mark and then dropped down below this value, Channel.isWritable() will start to return true again.

      Specified by:
      setWriteBufferLowWaterMark in interface ChannelConfig
      Specified by:
      setWriteBufferLowWaterMark in interface ServerSocketChannelConfig
      Overrides:
      setWriteBufferLowWaterMark in class KQueueChannelConfig
    • setWriteBufferWaterMark

      public KQueueServerChannelConfig setWriteBufferWaterMark(WriteBufferWaterMark writeBufferWaterMark)
      Description copied from interface: ChannelConfig
      Set the WriteBufferWaterMark which is used for setting the high and low water mark of the write buffer.
      Specified by:
      setWriteBufferWaterMark in interface ChannelConfig
      Specified by:
      setWriteBufferWaterMark in interface ServerSocketChannelConfig
      Overrides:
      setWriteBufferWaterMark in class KQueueChannelConfig
    • setMessageSizeEstimator

      public KQueueServerChannelConfig setMessageSizeEstimator(MessageSizeEstimator estimator)
      Description copied from interface: ChannelConfig
      Set the MessageSizeEstimator which is used for the channel to detect the size of a message.
      Specified by:
      setMessageSizeEstimator in interface ChannelConfig
      Specified by:
      setMessageSizeEstimator in interface ServerSocketChannelConfig
      Overrides:
      setMessageSizeEstimator in class KQueueChannelConfig
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.