Class MDBRelFunc

  • All Implemented Interfaces:
    java.lang.AutoCloseable, CallbackI, CallbackI.V, NativeResource, Pointer, MDBRelFuncI

    public abstract class MDBRelFunc
    extends Callback
    implements MDBRelFuncI
    A callback function used to relocate a position-dependent data item in a fixed-address database.

    The newptr gives the item's desired address in the memory map, and oldptr gives its previous address. The item's actual data resides at the address in item. This callback is expected to walk through the fields of the record in item and modify any values based at the oldptr address to be relative to the newptr address.

    Type

    
     void (*) (
         MDB_val *item,
         void *oldptr,
         void *newptr,
         void *relctx
     )
    • Method Detail

      • create

        public static MDBRelFunc create​(long functionPointer)
        Creates a MDBRelFunc instance from the specified function pointer.
        Returns:
        the new MDBRelFunc
      • createSafe

        @Nullable
        public static MDBRelFunc createSafe​(long functionPointer)
        Like create, but returns null if functionPointer is NULL.
      • create

        public static MDBRelFunc create​(MDBRelFuncI instance)
        Creates a MDBRelFunc instance that delegates to the specified MDBRelFuncI instance.