Package org.lwjgl.util.lmdb
Class MDBStat
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.lmdb.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; size_t ms_branch_pages; size_t ms_leaf_pages; size_t ms_overflow_pages; size_t ms_entries; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MDBStat.Buffer
An array ofMDBStat
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
MS_BRANCH_PAGES
MS_DEPTH
MS_ENTRIES
MS_LEAF_PAGES
MS_OVERFLOW_PAGES
MS_PSIZEThe struct member offsets.static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor Description MDBStat(java.nio.ByteBuffer container)
Creates aMDBStat
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MDBStat
calloc()
Returns a newMDBStat
instance allocated withmemCalloc
.static MDBStat.Buffer
calloc(int capacity)
Returns a newMDBStat.Buffer
instance allocated withmemCalloc
.static MDBStat
callocStack()
Returns a newMDBStat
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static MDBStat.Buffer
callocStack(int capacity)
Returns a newMDBStat.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static MDBStat.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newMDBStat.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static MDBStat
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newMDBStat
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static MDBStat
create()
Returns a newMDBStat
instance allocated withBufferUtils
.static MDBStat.Buffer
create(int capacity)
Returns a newMDBStat.Buffer
instance allocated withBufferUtils
.static MDBStat
create(long address)
Returns a newMDBStat
instance for the specified memory address.static MDBStat.Buffer
create(long address, int capacity)
Create aMDBStat.Buffer
instance at the specified memory.static MDBStat
createSafe(long address)
static MDBStat.Buffer
createSafe(long address, int capacity)
static MDBStat
malloc()
Returns a newMDBStat
instance allocated withmemAlloc
.static MDBStat.Buffer
malloc(int capacity)
Returns a newMDBStat.Buffer
instance allocated withmemAlloc
.static MDBStat
mallocStack()
Returns a newMDBStat
instance allocated on the thread-localMemoryStack
.static MDBStat.Buffer
mallocStack(int capacity)
Returns a newMDBStat.Buffer
instance allocated on the thread-localMemoryStack
.static MDBStat.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newMDBStat.Buffer
instance allocated on the specifiedMemoryStack
.static MDBStat
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newMDBStat
instance allocated on the specifiedMemoryStack
.long
ms_branch_pages()
Returns the value of thems_branch_pages
field.int
ms_depth()
Returns the value of thems_depth
field.long
ms_entries()
Returns the value of thems_entries
field.long
ms_leaf_pages()
Returns the value of thems_leaf_pages
field.long
ms_overflow_pages()
Returns the value of thems_overflow_pages
field.int
ms_psize()
Returns the value of thems_psize
field.static long
nms_branch_pages(long struct)
Unsafe version ofms_branch_pages()
.static int
nms_depth(long struct)
Unsafe version ofms_depth()
.static long
nms_entries(long struct)
Unsafe version ofms_entries()
.static long
nms_leaf_pages(long struct)
Unsafe version ofms_leaf_pages()
.static long
nms_overflow_pages(long struct)
Unsafe version ofms_overflow_pages()
.static int
nms_psize(long struct)
Unsafe version ofms_psize()
.int
sizeof()
-
-
-
Constructor Detail
-
MDBStat
public MDBStat(java.nio.ByteBuffer container)
Creates aMDBStat
instance at the current position of the specifiedByteBuffer
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()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
ms_psize
public int ms_psize()
Returns the value of thems_psize
field.
-
ms_depth
public int ms_depth()
Returns the value of thems_depth
field.
-
ms_branch_pages
public long ms_branch_pages()
Returns the value of thems_branch_pages
field.
-
ms_leaf_pages
public long ms_leaf_pages()
Returns the value of thems_leaf_pages
field.
-
ms_overflow_pages
public long ms_overflow_pages()
Returns the value of thems_overflow_pages
field.
-
ms_entries
public long ms_entries()
Returns the value of thems_entries
field.
-
malloc
public static MDBStat malloc()
Returns a newMDBStat
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static MDBStat calloc()
Returns a newMDBStat
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static MDBStat create()
Returns a newMDBStat
instance allocated withBufferUtils
.
-
create
public static MDBStat create(long address)
Returns a newMDBStat
instance for the specified memory address.
-
createSafe
@Nullable public static MDBStat createSafe(long address)
-
malloc
public static MDBStat.Buffer malloc(int capacity)
Returns a newMDBStat.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static MDBStat.Buffer calloc(int capacity)
Returns a newMDBStat.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static MDBStat.Buffer create(int capacity)
Returns a newMDBStat.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static MDBStat.Buffer create(long address, int capacity)
Create aMDBStat.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static MDBStat.Buffer createSafe(long address, int capacity)
-
mallocStack
public static MDBStat mallocStack()
Returns a newMDBStat
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static MDBStat callocStack()
Returns a newMDBStat
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static MDBStat mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newMDBStat
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static MDBStat callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newMDBStat
instance allocated on the specifiedMemoryStack
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 newMDBStat.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static MDBStat.Buffer callocStack(int capacity)
Returns a newMDBStat.Buffer
instance allocated on the thread-localMemoryStack
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 newMDBStat.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static MDBStat.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newMDBStat.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nms_psize
public static int nms_psize(long struct)
Unsafe version ofms_psize()
.
-
nms_depth
public static int nms_depth(long struct)
Unsafe version ofms_depth()
.
-
nms_branch_pages
public static long nms_branch_pages(long struct)
Unsafe version ofms_branch_pages()
.
-
nms_leaf_pages
public static long nms_leaf_pages(long struct)
Unsafe version ofms_leaf_pages()
.
-
nms_overflow_pages
public static long nms_overflow_pages(long struct)
Unsafe version ofms_overflow_pages()
.
-
nms_entries
public static long nms_entries(long struct)
Unsafe version ofms_entries()
.
-
-