Class MDBStat

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer


    public class MDBStat
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Statistics for a database in the environment.

    Member documentation

    • ms_psize – Size of a database page. This is currently the same for all databases.
    • ms_depth – Depth (height) of the B-tree.
    • ms_branch_pages – Number of internal (non-leaf) pages.
    • ms_leaf_pages – Number of leaf pages.
    • ms_overflow_pages – Number of overflow pages.
    • ms_entries – Number of data items.

    Layout

    struct MDB_stat {
        unsigned int ms_psize;
        unsigned int ms_depth;
        mdb_size_t ms_branch_pages;
        mdb_size_t ms_leaf_pages;
        mdb_size_t ms_overflow_pages;
        mdb_size_t ms_entries;
    }
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class and Description
      static class  MDBStat.Buffer
      An array of MDBStat structs.
      • Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

        org.lwjgl.system.Pointer.Default
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int SIZEOF
      The struct size in bytes.
      • Fields inherited from interface org.lwjgl.system.Pointer

        POINTER_SHIFT, POINTER_SIZE
    • Constructor Summary

      Constructors 
      Constructor and Description
      MDBStat(java.nio.ByteBuffer container)
      Creates a MDBStat instance at the current position of the specified ByteBuffer container.
    • Field Detail

      • SIZEOF

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

      • MDBStat

        public MDBStat(java.nio.ByteBuffer container)
        Creates a MDBStat 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 Detail

      • sizeof

        public int sizeof()
        Description copied from class: org.lwjgl.system.Struct
        Returns the sizeof(struct).
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • ms_psize

        public int ms_psize()
        Returns the value of the ms_psize field.
      • ms_depth

        public int ms_depth()
        Returns the value of the ms_depth field.
      • ms_branch_pages

        public long ms_branch_pages()
        Returns the value of the ms_branch_pages field.
      • ms_leaf_pages

        public long ms_leaf_pages()
        Returns the value of the ms_leaf_pages field.
      • ms_overflow_pages

        public long ms_overflow_pages()
        Returns the value of the ms_overflow_pages field.
      • ms_entries

        public long ms_entries()
        Returns the value of the ms_entries field.
      • malloc

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

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

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

        public static MDBStat create(long address)
        Returns a new MDBStat instance for the specified memory address or null if the address is NULL.
      • malloc

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

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

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

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

        public static MDBStat mallocStack()
        Returns a new MDBStat instance allocated on the thread-local MemoryStack.
      • callocStack

        public static MDBStat callocStack()
        Returns a new MDBStat instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static MDBStat mallocStack(org.lwjgl.system.MemoryStack stack)
        Returns a new MDBStat instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static MDBStat callocStack(org.lwjgl.system.MemoryStack stack)
        Returns a new MDBStat instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • mallocStack

        public static MDBStat.Buffer mallocStack(int capacity)
        Returns a new MDBStat.Buffer instance allocated on the thread-local MemoryStack.
        Parameters:
        capacity - the buffer capacity
      • callocStack

        public static MDBStat.Buffer callocStack(int capacity)
        Returns a new MDBStat.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
        Parameters:
        capacity - the buffer capacity
      • mallocStack

        public static MDBStat.Buffer mallocStack(int capacity,
                                                 org.lwjgl.system.MemoryStack stack)
        Returns a new MDBStat.Buffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • callocStack

        public static MDBStat.Buffer callocStack(int capacity,
                                                 org.lwjgl.system.MemoryStack stack)
        Returns a new MDBStat.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity