Class KQueueEventArray

java.lang.Object
io.netty.channel.kqueue.KQueueEventArray

final class KQueueEventArray extends Object
Represents an array of kevent structures, backed by offheap memory. struct kevent { uintptr_t ident; short keventFilter; u_short flags; u_int fflags; intptr_t data; void *udata; };
  • Field Details

    • KQUEUE_EVENT_SIZE

      private static final int KQUEUE_EVENT_SIZE
    • KQUEUE_IDENT_OFFSET

      private static final int KQUEUE_IDENT_OFFSET
    • KQUEUE_FILTER_OFFSET

      private static final int KQUEUE_FILTER_OFFSET
    • KQUEUE_FFLAGS_OFFSET

      private static final int KQUEUE_FFLAGS_OFFSET
    • KQUEUE_FLAGS_OFFSET

      private static final int KQUEUE_FLAGS_OFFSET
    • KQUEUE_DATA_OFFSET

      private static final int KQUEUE_DATA_OFFSET
    • memory

      private ByteBuffer memory
    • memoryAddress

      private long memoryAddress
    • size

      private int size
    • capacity

      private int capacity
  • Constructor Details

    • KQueueEventArray

      KQueueEventArray(int capacity)
  • Method Details

    • memoryAddress

      long memoryAddress()
      Return the memoryAddress which points to the start of this KQueueEventArray.
    • capacity

      int capacity()
      Return the capacity of the KQueueEventArray which represent the maximum number of kevents that can be stored in it.
    • size

      int size()
    • clear

      void clear()
    • evSet

      void evSet(AbstractKQueueChannel ch, short filter, short flags, int fflags)
    • reallocIfNeeded

      private void reallocIfNeeded()
    • realloc

      void realloc(boolean throwIfFail)
      Increase the storage of this KQueueEventArray.
    • free

      void free()
      Free this KQueueEventArray. Any usage after calling this method may segfault the JVM!
    • getKEventOffset

      private static int getKEventOffset(int index)
    • getKEventOffsetAddress

      private long getKEventOffsetAddress(int index)
    • getShort

      private short getShort(int index, int offset)
    • flags

      short flags(int index)
    • filter

      short filter(int index)
    • fflags

      short fflags(int index)
    • fd

      int fd(int index)
    • data

      long data(int index)
    • calculateBufferCapacity

      private static int calculateBufferCapacity(int capacity)
    • evSet

      private static void evSet(long keventAddress, int ident, short filter, short flags, int fflags)