NioEndpoint.KeyAttachment (Apache Tomcat 7.0.104 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 CountDownLatch` | `readLatch`
    `protected NioEndpoint.SendfileData` | `sendfileData`
    `protected 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(CountDownLatch latch, long timeout, TimeUnit unit)`
    `void` | `awaitReadLatch(long timeout, TimeUnit unit)`
    `void` | `awaitWriteLatch(long timeout, 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()`
    `CountDownLatch` | `getReadLatch()`
    `NioEndpoint.SendfileData` | `getSendfileData()`
    `CountDownLatch` | `getWriteLatch()`
    `long` | `getWriteTimeout()`
    `int` | `interestOps()`
    `int` | `interestOps(int ops)`
    `void` | `reset()`
    `void` | `reset(NioEndpoint.Poller poller, NioChannel channel, long soTimeout)`
    `protected CountDownLatch` | `resetLatch(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 CountDownLatch` | `startLatch(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 CountDownLatch readLatch

    - #### writeLatch

          protected 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 CountDownLatch getReadLatch()

    - #### getWriteLatch

          public CountDownLatch getWriteLatch()

    - #### resetLatch

          protected CountDownLatch resetLatch(CountDownLatch latch)

    - #### resetReadLatch

          public void resetReadLatch()

    - #### resetWriteLatch

          public void resetWriteLatch()

    - #### startLatch

          protected CountDownLatch startLatch(CountDownLatch latch,
                                  int cnt)

    - #### startReadLatch

          public void startReadLatch(int cnt)

    - #### startWriteLatch

          public void startWriteLatch(int cnt)

    - #### awaitLatch

          protected void awaitLatch(CountDownLatch latch,
                        long timeout,
                        TimeUnit unit)
                             throws InterruptedException

      Throws:
        `InterruptedException`

    - #### awaitReadLatch

          public void awaitReadLatch(long timeout,
                            TimeUnit unit)
                              throws InterruptedException

      Throws:
        `InterruptedException`

    - #### awaitWriteLatch

          public void awaitWriteLatch(long timeout,
                             TimeUnit unit)
                               throws InterruptedException

      Throws:
        `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-2020 Apache Software Foundation. All Rights Reserved.