Package org.lwjgl.util.lmdb
Class MDBEnvInfo
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.lmdb.MDBEnvInfo
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class MDBEnvInfo extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Information about the environment.Member documentation
me_mapaddr
– Address of map, if fixed.me_mapsize
– Size of the data memory map.me_last_pgno
– ID of the last used page.me_last_txnid
– ID of the last committed transaction.me_maxreaders
– Max reader slots in the environment.me_numreaders
– Max reader slots used in the environment.
Layout
struct MDB_envinfo { void * me_mapaddr; size_t me_mapsize; size_t me_last_pgno; size_t me_last_txnid; unsigned int me_maxreaders; unsigned int me_numreaders; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MDBEnvInfo.Buffer
An array ofMDBEnvInfo
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
ME_LAST_PGNO
ME_LAST_TXNID
ME_MAPADDR
ME_MAPSIZE
ME_MAXREADERS
ME_NUMREADERSThe struct member offsets.static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor Description MDBEnvInfo(java.nio.ByteBuffer container)
Creates aMDBEnvInfo
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 MDBEnvInfo
calloc()
Returns a newMDBEnvInfo
instance allocated withmemCalloc
.static MDBEnvInfo.Buffer
calloc(int capacity)
Returns a newMDBEnvInfo.Buffer
instance allocated withmemCalloc
.static MDBEnvInfo
callocStack()
Returns a newMDBEnvInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static MDBEnvInfo.Buffer
callocStack(int capacity)
Returns a newMDBEnvInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static MDBEnvInfo.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newMDBEnvInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static MDBEnvInfo
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newMDBEnvInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static MDBEnvInfo
create()
Returns a newMDBEnvInfo
instance allocated withBufferUtils
.static MDBEnvInfo.Buffer
create(int capacity)
Returns a newMDBEnvInfo.Buffer
instance allocated withBufferUtils
.static MDBEnvInfo
create(long address)
Returns a newMDBEnvInfo
instance for the specified memory address.static MDBEnvInfo.Buffer
create(long address, int capacity)
Create aMDBEnvInfo.Buffer
instance at the specified memory.static MDBEnvInfo
createSafe(long address)
static MDBEnvInfo.Buffer
createSafe(long address, int capacity)
static MDBEnvInfo
malloc()
Returns a newMDBEnvInfo
instance allocated withmemAlloc
.static MDBEnvInfo.Buffer
malloc(int capacity)
Returns a newMDBEnvInfo.Buffer
instance allocated withmemAlloc
.static MDBEnvInfo
mallocStack()
Returns a newMDBEnvInfo
instance allocated on the thread-localMemoryStack
.static MDBEnvInfo.Buffer
mallocStack(int capacity)
Returns a newMDBEnvInfo.Buffer
instance allocated on the thread-localMemoryStack
.static MDBEnvInfo.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newMDBEnvInfo.Buffer
instance allocated on the specifiedMemoryStack
.static MDBEnvInfo
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newMDBEnvInfo
instance allocated on the specifiedMemoryStack
.long
me_last_pgno()
Returns the value of theme_last_pgno
field.long
me_last_txnid()
Returns the value of theme_last_txnid
field.long
me_mapaddr()
Returns the value of theme_mapaddr
field.long
me_mapsize()
Returns the value of theme_mapsize
field.int
me_maxreaders()
Returns the value of theme_maxreaders
field.int
me_numreaders()
Returns the value of theme_numreaders
field.static long
nme_last_pgno(long struct)
Unsafe version ofme_last_pgno()
.static long
nme_last_txnid(long struct)
Unsafe version ofme_last_txnid()
.static long
nme_mapaddr(long struct)
Unsafe version ofme_mapaddr()
.static long
nme_mapsize(long struct)
Unsafe version ofme_mapsize()
.static int
nme_maxreaders(long struct)
Unsafe version ofme_maxreaders()
.static int
nme_numreaders(long struct)
Unsafe version ofme_numreaders()
.int
sizeof()
-
-
-
Constructor Detail
-
MDBEnvInfo
public MDBEnvInfo(java.nio.ByteBuffer container)
Creates aMDBEnvInfo
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
-
me_mapaddr
public long me_mapaddr()
Returns the value of theme_mapaddr
field.
-
me_mapsize
public long me_mapsize()
Returns the value of theme_mapsize
field.
-
me_last_pgno
public long me_last_pgno()
Returns the value of theme_last_pgno
field.
-
me_last_txnid
public long me_last_txnid()
Returns the value of theme_last_txnid
field.
-
me_maxreaders
public int me_maxreaders()
Returns the value of theme_maxreaders
field.
-
me_numreaders
public int me_numreaders()
Returns the value of theme_numreaders
field.
-
malloc
public static MDBEnvInfo malloc()
Returns a newMDBEnvInfo
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static MDBEnvInfo calloc()
Returns a newMDBEnvInfo
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static MDBEnvInfo create()
Returns a newMDBEnvInfo
instance allocated withBufferUtils
.
-
create
public static MDBEnvInfo create(long address)
Returns a newMDBEnvInfo
instance for the specified memory address.
-
createSafe
@Nullable public static MDBEnvInfo createSafe(long address)
-
malloc
public static MDBEnvInfo.Buffer malloc(int capacity)
Returns a newMDBEnvInfo.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static MDBEnvInfo.Buffer calloc(int capacity)
Returns a newMDBEnvInfo.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static MDBEnvInfo.Buffer create(int capacity)
Returns a newMDBEnvInfo.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static MDBEnvInfo.Buffer create(long address, int capacity)
Create aMDBEnvInfo.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static MDBEnvInfo.Buffer createSafe(long address, int capacity)
-
mallocStack
public static MDBEnvInfo mallocStack()
Returns a newMDBEnvInfo
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static MDBEnvInfo callocStack()
Returns a newMDBEnvInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static MDBEnvInfo mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newMDBEnvInfo
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static MDBEnvInfo callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newMDBEnvInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static MDBEnvInfo.Buffer mallocStack(int capacity)
Returns a newMDBEnvInfo.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static MDBEnvInfo.Buffer callocStack(int capacity)
Returns a newMDBEnvInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static MDBEnvInfo.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newMDBEnvInfo.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static MDBEnvInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newMDBEnvInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nme_mapaddr
public static long nme_mapaddr(long struct)
Unsafe version ofme_mapaddr()
.
-
nme_mapsize
public static long nme_mapsize(long struct)
Unsafe version ofme_mapsize()
.
-
nme_last_pgno
public static long nme_last_pgno(long struct)
Unsafe version ofme_last_pgno()
.
-
nme_last_txnid
public static long nme_last_txnid(long struct)
Unsafe version ofme_last_txnid()
.
-
nme_maxreaders
public static int nme_maxreaders(long struct)
Unsafe version ofme_maxreaders()
.
-
nme_numreaders
public static int nme_numreaders(long struct)
Unsafe version ofme_numreaders()
.
-
-