Class NativeArrowBackend
java.lang.Object
org.episteme.nativ.io.backends.NativeArrowBackend
- All Implemented Interfaces:
AlgorithmProvider, Backend, ComputeBackend, NativeBackend
@AutoService({Backend.class,ComputeBackend.class,NativeBackend.class,AlgorithmProvider.class})
public class NativeArrowBackend
extends Object
implements AlgorithmProvider, ComputeBackend, NativeBackend
Native Data Backend using Panama FFM bindings for Apache Arrow / Parquet.
Facilitates zero-copy data exchange between Java and native libraries using the Arrow C Data Interface.
- Since:
- 1.2
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates an execution context for running operations.Returns the type of hardware accelerator used by this backend.Returns the unique category of the algorithm.getName()Returns the display name for UI presentation.Returns the name of the native library this backend depends on.intReturns the execution priority (higher is better).voidimportArray(MemorySegment arrayStruct, MemorySegment schemaStruct) booleanChecks if the provider is available in the current environment.booleanisLoaded()Checks if the native library is loaded and available.<T> Stream<T> voidshutdown()Called when the provider is no longer needed (e.g., application shutdown).Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface AlgorithmProvider
description, getMetadata, scoreMethods inherited from interface Backend
getAlgorithmProviders, getStatusMessage, isExplicitlyDisabledMethods inherited from interface ComputeBackend
createBackend, getDescription, getId, getType, supportsComplexNumbers, supportsFloatingPoint, supportsParallelOps
-
Constructor Details
-
NativeArrowBackend
public NativeArrowBackend()
-
-
Method Details
-
isLoaded
public boolean isLoaded()Description copied from interface:NativeBackendChecks if the native library is loaded and available.- Specified by:
isLoadedin interfaceNativeBackend- Returns:
- true if the native library has been successfully loaded
-
getNativeLibraryName
Description copied from interface:NativeBackendReturns the name of the native library this backend depends on.- Specified by:
getNativeLibraryNamein interfaceNativeBackend- Returns:
- library name (e.g., "openblas", "cuda", "fftw3")
-
getAcceleratorType
Description copied from interface:ComputeBackendReturns the type of hardware accelerator used by this backend.- Specified by:
getAcceleratorTypein interfaceComputeBackend- Returns:
- the accelerator type
-
createContext
Description copied from interface:ComputeBackendCreates an execution context for running operations.The context should be used within a try-with-resources block to ensure proper cleanup of resources.
- Specified by:
createContextin interfaceComputeBackend- Returns:
- new execution context
-
query
-
isAvailable
public boolean isAvailable()Description copied from interface:AlgorithmProviderChecks if the provider is available in the current environment.- Specified by:
isAvailablein interfaceAlgorithmProvider- Specified by:
isAvailablein interfaceBackend
-
getAlgorithmType
Description copied from interface:AlgorithmProviderReturns the unique category of the algorithm.- Specified by:
getAlgorithmTypein interfaceAlgorithmProvider
-
importArray
-
getName
-
getPriority
public int getPriority()Description copied from interface:AlgorithmProviderReturns the execution priority (higher is better).- Specified by:
getPriorityin interfaceAlgorithmProvider- Specified by:
getPriorityin interfaceBackend
-
shutdown
public void shutdown()Description copied from interface:AlgorithmProviderCalled when the provider is no longer needed (e.g., application shutdown). Use this to release local resources or close native segments.- Specified by:
shutdownin interfaceAlgorithmProvider- Specified by:
shutdownin interfaceBackend
-