Class UnsafeSliceFactory

java.lang.Object
io.airlift.slice.UnsafeSliceFactory

@Deprecated(forRemoval=true) public class UnsafeSliceFactory extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
A slice factory for creating unsafe slices
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Get a factory for creating "unsafe" slices that can reference arbitrary memory addresses.
    newSlice(long address, int size)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates a slice for directly a raw memory address.
    newSlice(long address, int size, Object reference)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates a slice for directly a raw memory address.
    newSlice(Object base, long address, int size)
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getInstance

      public static UnsafeSliceFactory getInstance()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get a factory for creating "unsafe" slices that can reference arbitrary memory addresses.
      Returns:
      an unsafe slice factory
    • newSlice

      public Slice newSlice(long address, int size)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a slice for directly a raw memory address. This is inherently unsafe as it may be used to access arbitrary memory.
      Parameters:
      address - the raw memory address base
      size - the size of the slice
      Returns:
      the unsafe slice
    • newSlice

      public Slice newSlice(long address, int size, Object reference)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a slice for directly a raw memory address. This is inherently unsafe as it may be used to access arbitrary memory. The slice will hold the specified object reference to prevent the garbage collector from freeing it while it is in use by the slice.
      Parameters:
      address - the raw memory address base
      size - the size of the slice
      reference - the object reference
      Returns:
      the unsafe slice
    • newSlice

      public Slice newSlice(Object base, long address, int size)
      Deprecated, for removal: This API element is subject to removal in a future version.