Class ExtentHooks

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class ExtentHooks extends Struct<ExtentHooks> implements NativeResource

 struct extent_hooks_t {
     {@link ExtentAllocI extent_alloc_t} alloc;
     {@link ExtentDallocI extent_dalloc_t} dalloc;
     {@link ExtentDestroyI extent_destroy_t} destroy;
     {@link ExtentCommitI extent_commit_t} commit;
     {@link ExtentDecommitI extent_decommit_t} decommit;
     {@link ExtentPurgeI extent_purge_t} purge_lazy;
     {@link ExtentPurgeI extent_purge_t} purge_forced;
     {@link ExtentSplitI extent_split_t} split;
     {@link ExtentMergeI extent_merge_t} merge;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int ALLOC
      The struct member offsets.
    • DALLOC

      public static final int DALLOC
      The struct member offsets.
    • DESTROY

      public static final int DESTROY
      The struct member offsets.
    • COMMIT

      public static final int COMMIT
      The struct member offsets.
    • DECOMMIT

      public static final int DECOMMIT
      The struct member offsets.
    • PURGE_LAZY

      public static final int PURGE_LAZY
      The struct member offsets.
    • PURGE_FORCED

      public static final int PURGE_FORCED
      The struct member offsets.
    • SPLIT

      public static final int SPLIT
      The struct member offsets.
    • MERGE

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

    • ExtentHooks

      public ExtentHooks(ByteBuffer container)
      Creates a ExtentHooks 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<ExtentHooks>
    • alloc

      public ExtentAlloc alloc()
      Returns:
      the value of the alloc field.
    • dalloc

      public @Nullable ExtentDalloc dalloc()
      Returns:
      the value of the dalloc field.
    • destroy

      public @Nullable ExtentDestroy destroy()
      Returns:
      the value of the destroy field.
    • commit

      public @Nullable ExtentCommit commit()
      Returns:
      the value of the commit field.
    • decommit

      public @Nullable ExtentDecommit decommit()
      Returns:
      the value of the decommit field.
    • purge_lazy

      public @Nullable ExtentPurge purge_lazy()
      Returns:
      the value of the purge_lazy field.
    • purge_forced

      public @Nullable ExtentPurge purge_forced()
      Returns:
      the value of the purge_forced field.
    • split

      public @Nullable ExtentSplit split()
      Returns:
      the value of the split field.
    • merge

      public @Nullable ExtentMerge merge()
      Returns:
      the value of the merge field.
    • alloc

      public ExtentHooks alloc(ExtentAllocI value)
      Sets the specified value to the alloc field.
    • dalloc

      public ExtentHooks dalloc(@Nullable ExtentDallocI value)
      Sets the specified value to the dalloc field.
    • destroy

      public ExtentHooks destroy(@Nullable ExtentDestroyI value)
      Sets the specified value to the destroy field.
    • commit

      public ExtentHooks commit(@Nullable ExtentCommitI value)
      Sets the specified value to the commit field.
    • decommit

      public ExtentHooks decommit(@Nullable ExtentDecommitI value)
      Sets the specified value to the decommit field.
    • purge_lazy

      public ExtentHooks purge_lazy(@Nullable ExtentPurgeI value)
      Sets the specified value to the purge_lazy field.
    • purge_forced

      public ExtentHooks purge_forced(@Nullable ExtentPurgeI value)
      Sets the specified value to the purge_forced field.
    • split

      public ExtentHooks split(@Nullable ExtentSplitI value)
      Sets the specified value to the split field.
    • merge

      public ExtentHooks merge(@Nullable ExtentMergeI value)
      Sets the specified value to the merge field.
    • set

      public ExtentHooks set(ExtentAllocI alloc, ExtentDallocI dalloc, ExtentDestroyI destroy, ExtentCommitI commit, ExtentDecommitI decommit, ExtentPurgeI purge_lazy, ExtentPurgeI purge_forced, ExtentSplitI split, ExtentMergeI merge)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

      @Deprecated public static ExtentHooks mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static ExtentHooks callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static ExtentHooks mallocStack(MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static ExtentHooks callocStack(MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • malloc

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

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

      public static ExtentAlloc nalloc(long struct)
      Unsafe version of alloc().
    • ndalloc

      public static @Nullable ExtentDalloc ndalloc(long struct)
      Unsafe version of dalloc().
    • ndestroy

      public static @Nullable ExtentDestroy ndestroy(long struct)
      Unsafe version of destroy().
    • ncommit

      public static @Nullable ExtentCommit ncommit(long struct)
      Unsafe version of commit().
    • ndecommit

      public static @Nullable ExtentDecommit ndecommit(long struct)
      Unsafe version of decommit().
    • npurge_lazy

      public static @Nullable ExtentPurge npurge_lazy(long struct)
      Unsafe version of purge_lazy().
    • npurge_forced

      public static @Nullable ExtentPurge npurge_forced(long struct)
      Unsafe version of purge_forced().
    • nsplit

      public static @Nullable ExtentSplit nsplit(long struct)
      Unsafe version of split().
    • nmerge

      public static @Nullable ExtentMerge nmerge(long struct)
      Unsafe version of merge().
    • nalloc

      public static void nalloc(long struct, ExtentAllocI value)
      Unsafe version of alloc.
    • ndalloc

      public static void ndalloc(long struct, @Nullable ExtentDallocI value)
      Unsafe version of dalloc.
    • ndestroy

      public static void ndestroy(long struct, @Nullable ExtentDestroyI value)
      Unsafe version of destroy.
    • ncommit

      public static void ncommit(long struct, @Nullable ExtentCommitI value)
      Unsafe version of commit.
    • ndecommit

      public static void ndecommit(long struct, @Nullable ExtentDecommitI value)
      Unsafe version of decommit.
    • npurge_lazy

      public static void npurge_lazy(long struct, @Nullable ExtentPurgeI value)
      Unsafe version of purge_lazy.
    • npurge_forced

      public static void npurge_forced(long struct, @Nullable ExtentPurgeI value)
      Unsafe version of purge_forced.
    • nsplit

      public static void nsplit(long struct, @Nullable ExtentSplitI value)
      Unsafe version of split.
    • nmerge

      public static void nmerge(long struct, @Nullable ExtentMergeI value)
      Unsafe version of merge.
    • validate

      public static void validate(long struct)
      Validates pointer members that should not be NULL.
      Parameters:
      struct - the struct to validate