Class IOURingCQE

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class IOURingCQE extends Struct<IOURingCQE> implements NativeResource

 struct io_uring_cqe {
     __u64 user_data;
     __s32 res;
     __u32 flags;
     __u64 big_cqe[0];
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • USER_DATA

      public static final int USER_DATA
      The struct member offsets.
    • RES

      public static final int RES
      The struct member offsets.
    • FLAGS

      public static final int FLAGS
      The struct member offsets.
    • BIG_CQE

      public static final int BIG_CQE
      The struct member offsets.
  • Constructor Details

    • IOURingCQE

      public IOURingCQE(ByteBuffer container)
      Creates a IOURingCQE instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<IOURingCQE>
    • user_data

      public long user_data()
      Returns:
      the value of the user_data field.
    • res

      public int res()
      Returns:
      the value of the res field.
    • flags

      public int flags()
      Returns:
      the value of the flags field.
    • big_cqe

      public LongBuffer big_cqe()
      Returns:
      a LongBuffer view of the big_cqe field.
    • big_cqe

      public long big_cqe(int index)
      Returns:
      the value at the specified index of the big_cqe field.
    • user_data

      public IOURingCQE user_data(long value)
      Sets the specified value to the user_data field.
    • res

      public IOURingCQE res(int value)
      Sets the specified value to the res field.
    • flags

      public IOURingCQE flags(int value)
      Sets the specified value to the flags field.
    • big_cqe

      public IOURingCQE big_cqe(LongBuffer value)
      Copies the specified LongBuffer to the big_cqe field.
    • big_cqe

      public IOURingCQE big_cqe(int index, long value)
      Sets the specified value at the specified index of the big_cqe field.
    • set

      public IOURingCQE set(long user_data, int res, int flags, LongBuffer big_cqe)
      Initializes this struct with the specified values.
    • set

      public IOURingCQE set(IOURingCQE src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static IOURingCQE malloc()
      Returns a new IOURingCQE instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static IOURingCQE calloc()
      Returns a new IOURingCQE instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static IOURingCQE create()
      Returns a new IOURingCQE instance allocated with BufferUtils.
    • create

      public static IOURingCQE create(long address)
      Returns a new IOURingCQE instance for the specified memory address.
    • createSafe

      public static @Nullable IOURingCQE createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static IOURingCQE.Buffer malloc(int capacity)
      Returns a new IOURingCQE.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static IOURingCQE.Buffer calloc(int capacity)
      Returns a new IOURingCQE.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static IOURingCQE.Buffer create(int capacity)
      Returns a new IOURingCQE.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static IOURingCQE.Buffer create(long address, int capacity)
      Create a IOURingCQE.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable IOURingCQE.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static IOURingCQE malloc(MemoryStack stack)
      Returns a new IOURingCQE instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static IOURingCQE calloc(MemoryStack stack)
      Returns a new IOURingCQE instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static IOURingCQE.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new IOURingCQE.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static IOURingCQE.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new IOURingCQE.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nuser_data

      public static long nuser_data(long struct)
      Unsafe version of user_data().
    • nres

      public static int nres(long struct)
      Unsafe version of res().
    • nflags

      public static int nflags(long struct)
      Unsafe version of flags().
    • nbig_cqe

      public static LongBuffer nbig_cqe(long struct)
      Unsafe version of big_cqe().
    • nbig_cqe

      public static long nbig_cqe(long struct, int index)
      Unsafe version of big_cqe.
    • nuser_data

      public static void nuser_data(long struct, long value)
      Unsafe version of user_data.
    • nres

      public static void nres(long struct, int value)
      Unsafe version of res.
    • nflags

      public static void nflags(long struct, int value)
      Unsafe version of flags.
    • nbig_cqe

      public static void nbig_cqe(long struct, LongBuffer value)
      Unsafe version of big_cqe.
    • nbig_cqe

      public static void nbig_cqe(long struct, int index, long value)
      Unsafe version of big_cqe.