NioEndpoint.KeyAttachment (Apache Tomcat 7.0.96 API Documentation)

org.apache.tomcat.util.net

## Class NioEndpoint.KeyAttachment

- java.lang.Object
- - org.apache.tomcat.util.net.SocketWrapper<NioChannel>
  - - org.apache.tomcat.util.net.NioEndpoint.KeyAttachment

- Enclosing class:
    NioEndpoint

      public static class NioEndpoint.KeyAttachment
      extends SocketWrapper<NioChannel>

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected boolean` | `comet`
    `protected boolean` | `cometNotify`
    `protected int` | `cometOps`
    `protected int` | `interestOps`
    `protected NioEndpoint.Poller` | `poller`
    `protected java.util.concurrent.CountDownLatch` | `readLatch`
    `protected NioEndpoint.SendfileData` | `sendfileData`
    `protected java.util.concurrent.CountDownLatch` | `writeLatch`

    - ### Fields inherited from class org.apache.tomcat.util.net.SocketWrapper

      `async, error, keepAliveLeft, keptAlive, lastAccess, lastRegistered, socket, timeout`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NioEndpoint.KeyAttachment(NioChannel channel)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `awaitLatch(java.util.concurrent.CountDownLatch latch, long timeout, java.util.concurrent.TimeUnit unit)`
    `void` | `awaitReadLatch(long timeout, java.util.concurrent.TimeUnit unit)`
    `void` | `awaitWriteLatch(long timeout, java.util.concurrent.TimeUnit unit)`
    `NioChannel` | `getChannel()`
    `boolean` | `getCometNotify()`
    `int` | `getCometOps()` Deprecated. Unused - will be removed in Tomcat 8
    `long` | `getLastRegistered()` Deprecated. Unused - will be removed in Tomcat 8
    `NioEndpoint.Poller` | `getPoller()`
    `java.util.concurrent.CountDownLatch` | `getReadLatch()`
    `NioEndpoint.SendfileData` | `getSendfileData()`
    `java.util.concurrent.CountDownLatch` | `getWriteLatch()`
    `long` | `getWriteTimeout()`
    `int` | `interestOps()`
    `int` | `interestOps(int ops)`
    `void` | `reset()`
    `void` | `reset(NioEndpoint.Poller poller, NioChannel channel, long soTimeout)`
    `protected java.util.concurrent.CountDownLatch` | `resetLatch(java.util.concurrent.CountDownLatch latch)`
    `void` | `resetReadLatch()`
    `void` | `resetWriteLatch()`
    `void` | `setChannel(NioChannel channel)`
    `void` | `setCometNotify(boolean notify)`
    `void` | `setCometOps(int ops)` Deprecated. Unused (value is set but never read) - will be removed in Tomcat 8
    `void` | `setLastRegistered(long reg)` Deprecated. Unused - will be removed in Tomcat 8
    `void` | `setPoller(NioEndpoint.Poller poller)`
    `void` | `setSendfileData(NioEndpoint.SendfileData sf)`
    `void` | `setWriteTimeout(long writeTimeout)`
    `protected java.util.concurrent.CountDownLatch` | `startLatch(java.util.concurrent.CountDownLatch latch, int cnt)`
    `void` | `startReadLatch(int cnt)`
    `void` | `startWriteLatch(int cnt)`

    - ### Methods inherited from class org.apache.tomcat.util.net.SocketWrapper

      `access, access, decrementKeepAlive, getBlockingStatus, getBlockingStatusReadLock, getBlockingStatusWriteLock, getError, getLastAccess, getSocket, getTimeout, getWriteThreadLock, isAsync, isComet, isKeptAlive, isSecure, isUpgraded, reset, setAsync, setBlockingStatus, setComet, setError, setKeepAliveLeft, setKeptAlive, setSecure, setTimeout, setUpgraded, toString`

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

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

- - ### Field Detail

    - #### poller

          protected NioEndpoint.Poller poller

    - #### interestOps

          protected int interestOps

    - #### comet

          protected boolean comet

    - #### cometOps

          protected int cometOps

    - #### cometNotify

          protected boolean cometNotify

    - #### readLatch

          protected java.util.concurrent.CountDownLatch readLatch

    - #### writeLatch

          protected java.util.concurrent.CountDownLatch writeLatch

    - #### sendfileData

          protected volatile NioEndpoint.SendfileData sendfileData

  - ### Constructor Detail

    - #### NioEndpoint.KeyAttachment

          public NioEndpoint.KeyAttachment(NioChannel channel)

  - ### Method Detail

    - #### reset

          public void reset(NioEndpoint.Poller poller,
                   NioChannel channel,
                   long soTimeout)

    - #### reset

          public void reset()

    - #### getPoller

          public NioEndpoint.Poller getPoller()

    - #### setPoller

          public void setPoller(NioEndpoint.Poller poller)

    - #### setCometNotify

          public void setCometNotify(boolean notify)

    - #### getCometNotify

          public boolean getCometNotify()

    - #### setCometOps

          @Deprecated
          public void setCometOps(int ops)

      Deprecated. Unused (value is set but never read) - will be removed in Tomcat 8

    - #### getCometOps

          @Deprecated
          public int getCometOps()

      Deprecated. Unused - will be removed in Tomcat 8

    - #### getChannel

          public NioChannel getChannel()

    - #### setChannel

          public void setChannel(NioChannel channel)

    - #### interestOps

          public int interestOps()

    - #### interestOps

          public int interestOps(int ops)

    - #### getReadLatch

          public java.util.concurrent.CountDownLatch getReadLatch()

    - #### getWriteLatch

          public java.util.concurrent.CountDownLatch getWriteLatch()

    - #### resetLatch

          protected java.util.concurrent.CountDownLatch resetLatch(java.util.concurrent.CountDownLatch latch)

    - #### resetReadLatch

          public void resetReadLatch()

    - #### resetWriteLatch

          public void resetWriteLatch()

    - #### startLatch

          protected java.util.concurrent.CountDownLatch startLatch(java.util.concurrent.CountDownLatch latch,
                                                       int cnt)

    - #### startReadLatch

          public void startReadLatch(int cnt)

    - #### startWriteLatch

          public void startWriteLatch(int cnt)

    - #### awaitLatch

          protected void awaitLatch(java.util.concurrent.CountDownLatch latch,
                        long timeout,
                        java.util.concurrent.TimeUnit unit)
                             throws java.lang.InterruptedException

      Throws:
        `java.lang.InterruptedException`

    - #### awaitReadLatch

          public void awaitReadLatch(long timeout,
                            java.util.concurrent.TimeUnit unit)
                              throws java.lang.InterruptedException

      Throws:
        `java.lang.InterruptedException`

    - #### awaitWriteLatch

          public void awaitWriteLatch(long timeout,
                             java.util.concurrent.TimeUnit unit)
                               throws java.lang.InterruptedException

      Throws:
        `java.lang.InterruptedException`

    - #### getLastRegistered

          @Deprecated
          public long getLastRegistered()

      Deprecated. Unused - will be removed in Tomcat 8

    - #### setLastRegistered

          @Deprecated
          public void setLastRegistered(long reg)

      Deprecated. Unused - will be removed in Tomcat 8

    - #### setSendfileData

          public void setSendfileData(NioEndpoint.SendfileData sf)

    - #### getSendfileData

          public NioEndpoint.SendfileData getSendfileData()

    - #### setWriteTimeout

          public void setWriteTimeout(long writeTimeout)

    - #### getWriteTimeout

          public long getWriteTimeout()

Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.