org.apache.cassandra.thrift

## Class TCustomServerSocket

- java.lang.Object
- - org.apache.thrift.transport.TServerTransport
  - - org.apache.cassandra.thrift.TCustomServerSocket

-     public class TCustomServerSocket
      extends org.apache.thrift.transport.TServerTransport

  Extends Thrift's TServerSocket to allow customization of various desirable TCP properties.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TCustomServerSocket(java.net.InetSocketAddress bindAddr, boolean keepAlive, java.lang.Integer sendBufferSize, java.lang.Integer recvBufferSize)` Allows fine-tuning of the server socket including keep-alive, reuse of addresses, send and receive buffer sizes.
    `TCustomServerSocket(java.net.ServerSocket socket, boolean keepAlive, java.lang.Integer sendBufferSize, java.lang.Integer recvBufferSize)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected TCustomSocket` | `acceptImpl()`
    `void` | `close()`
    `void` | `interrupt()` Optional method implementation.
    `void` | `listen()`

    - ### Methods inherited from class org.apache.thrift.transport.TServerTransport

      `accept`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TCustomServerSocket

          public TCustomServerSocket(java.net.InetSocketAddress bindAddr,
                             boolean keepAlive,
                             java.lang.Integer sendBufferSize,
                             java.lang.Integer recvBufferSize)
                              throws org.apache.thrift.transport.TTransportException

      Allows fine-tuning of the server socket including keep-alive, reuse of addresses, send and receive buffer sizes.
      Parameters:
        `bindAddr` -
        `keepAlive` -
        `sendBufferSize` -
        `recvBufferSize` -
      Throws:
        `org.apache.thrift.transport.TTransportException`

    - #### TCustomServerSocket

          public TCustomServerSocket(java.net.ServerSocket socket,
                             boolean keepAlive,
                             java.lang.Integer sendBufferSize,
                             java.lang.Integer recvBufferSize)
                              throws org.apache.thrift.transport.TTransportException

      Throws:
        `org.apache.thrift.transport.TTransportException`

  - ### Method Detail

    - #### acceptImpl

          protected TCustomSocket acceptImpl()
                                      throws org.apache.thrift.transport.TTransportException

      Specified by:
        `acceptImpl` in class `org.apache.thrift.transport.TServerTransport`
      Throws:
        `org.apache.thrift.transport.TTransportException`

    - #### listen

          public void listen()
                      throws org.apache.thrift.transport.TTransportException

      Specified by:
        `listen` in class `org.apache.thrift.transport.TServerTransport`
      Throws:
        `org.apache.thrift.transport.TTransportException`

    - #### close

          public void close()

      Specified by:
        `close` in class `org.apache.thrift.transport.TServerTransport`

    - #### interrupt

          public void interrupt()

      Description copied from class: `org.apache.thrift.transport.TServerTransport`
      Optional method implementation. This signals to the server transport that it should break out of any accept() or listen() that it is currently blocked on. This method, if implemented, MUST be thread safe, as it may be called from a different thread context than the other TServerTransport methods.
      Overrides:
        `interrupt` in class `org.apache.thrift.transport.TServerTransport`

Copyright © 2014 The Apache Software Foundation