Top Description Fields Constructors Methods
io.netty5.channel.kqueue

pack-priv final Class KQueueEventArray

extends Object
Class Inheritance
Imports
io.netty5.channel.unix.Buffer, io.netty5.util.internal.PlatformDependent, java.nio.ByteBuffer

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 Summary

Modifier and TypeField and Description
private int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private ByteBuffer
private long
private int

Constructor Summary

AccessConstructor and Description
pack-priv
KQueueEventArray(int capacity)

Method Summary

Modifier and TypeMethod and Description
private static int
pack-priv int
capacity()

Return the capacity of the KQueueEventArray which represent the maximum number of kevents that can be stored in it.

pack-priv void
pack-priv long
data(int index)

pack-priv void
evSet(AbstractKQueueChannel<P extends UnixChannel> ch, short filter, short flags, int fflags)

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

pack-priv int
fd(int index)

pack-priv short
fflags(int index)

pack-priv short
filter(int index)

pack-priv short
flags(int index)

pack-priv void
free()

Free this KQueueEventArray.

private static int
getKEventOffset(int index)

private long
private short
getShort(int index, int offset)

pack-priv long
memoryAddress()

Return the memoryAddress which points to the start of this KQueueEventArray.

pack-priv void
realloc(boolean throwIfFail)

Increase the storage of this KQueueEventArray.

private void
pack-priv int
size()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

capacityback to summary
private int capacity
KQUEUE_DATA_OFFSETback to summary
private static final int KQUEUE_DATA_OFFSET
KQUEUE_EVENT_SIZEback to summary
private static final int KQUEUE_EVENT_SIZE
KQUEUE_FFLAGS_OFFSETback to summary
private static final int KQUEUE_FFLAGS_OFFSET
KQUEUE_FILTER_OFFSETback to summary
private static final int KQUEUE_FILTER_OFFSET
KQUEUE_FLAGS_OFFSETback to summary
private static final int KQUEUE_FLAGS_OFFSET
KQUEUE_IDENT_OFFSETback to summary
private static final int KQUEUE_IDENT_OFFSET
memoryback to summary
private ByteBuffer memory
memoryAddressback to summary
private long memoryAddress
sizeback to summary
private int size

Constructor Detail

KQueueEventArrayback to summary
pack-priv KQueueEventArray(int capacity)

Method Detail

calculateBufferCapacityback to summary
private static int calculateBufferCapacity(int capacity)
capacityback to summary
pack-priv int capacity()

Return the capacity of the KQueueEventArray which represent the maximum number of kevents that can be stored in it.

clearback to summary
pack-priv void clear()
databack to summary
pack-priv long data(int index)
evSetback to summary
pack-priv void evSet(AbstractKQueueChannel<P extends UnixChannel> ch, short filter, short flags, int fflags)
evSetback to summary
private static native void evSet(long keventAddress, int ident, short filter, short flags, int fflags)
fdback to summary
pack-priv int fd(int index)
fflagsback to summary
pack-priv short fflags(int index)
filterback to summary
pack-priv short filter(int index)
flagsback to summary
pack-priv short flags(int index)
freeback to summary
pack-priv void free()

Free this KQueueEventArray. Any usage after calling this method may segfault the JVM!

getKEventOffsetback to summary
private static int getKEventOffset(int index)
getKEventOffsetAddressback to summary
private long getKEventOffsetAddress(int index)
getShortback to summary
private short getShort(int index, int offset)
memoryAddressback to summary
pack-priv long memoryAddress()

Return the memoryAddress which points to the start of this KQueueEventArray.

reallocback to summary
pack-priv void realloc(boolean throwIfFail)

Increase the storage of this KQueueEventArray.

reallocIfNeededback to summary
private void reallocIfNeeded()
sizeback to summary
pack-priv int size()