Package io.airlift.slice
Class UnsafeSliceFactory
java.lang.Object
io.airlift.slice.UnsafeSliceFactory
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 TypeMethodDescriptionstatic UnsafeSliceFactoryDeprecated, 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.Deprecated, for removal: This API element is subject to removal in a future version.Creates a slice for directly a raw memory address.Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Details
-
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
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 basesize- the size of the slice- Returns:
- the unsafe slice
-
newSlice
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 basesize- the size of the slicereference- the object reference- Returns:
- the unsafe slice
-
newSlice
Deprecated, for removal: This API element is subject to removal in a future version.
-