Interface Backend
- All Known Subinterfaces:
AudioBackend, ComputeBackend, CPUBackend, DistributedBackend, GPUBackend, GraphBackend, LinearAlgebraBackend<E>, MapBackend, MechanicsBackend, MolecularBackend, PlottingBackend, QuantumBackend, SIMDBackend, TensorBackend, VideoBackend, VisionBackend
- All Known Implementing Classes:
AbstractNativeCPULinearAlgebraBackend, AbstractNativeFFMBLASBackend, AbstractNativeSIMDLinearAlgebraBackend, AmazonBraketBackend, CARMALinearAlgebraProvider, ColtBackend, CommonsMathBackend, CPUDenseLinearAlgebraProvider, CPUDenseTensorBackend, CPUJzy3dPlot3DBackend, CPUSparseLinearAlgebraProvider, CPUSparseTensorBackend, DefaultCPUBackend, DistributedLinearAlgebraProvider, EJMLBackend, EpistemeLinearAlgebraBackend, GenesisBackend, GeoToolsBackend, GoogleGeoChartBackend, GraphStreamBackend, GRPCLinearAlgebraBackend, HDF5IOBackend, IBMQBackend, JavaAWTVisionBackend, JavaCVMediaBackend, JavaFXGraphBackend, JavaFXMapBackend, JavaFXMolecularBackend, JavaFXPlot2DBackend, JavaFXPlot3DBackend, JavaSoundAudioBackend, JBlasBackend, JFreeChartPlot2DBackend, JGraphTBackend, JmolMolecularBackend, MinimAudioBackend, MPIDistributedBackend, MulticoreAudioBackend, MulticoreVideoBackend, MulticoreVisionBackend, NativeArrowBackend, NativeBulletBackend, NativeCollisionBackend, NativeCPUCBindingVisionBackend, NativeCPULinearAlgebraComplexBackend, NativeCPULinearAlgebraRealBackend, NativeCPUTensorBackend, NativeCPUVisionBackend, NativeCUDADenseLinearAlgebraDoubleBackend, NativeCUDADenseLinearAlgebraFloatBackend, NativeCUDANBodyBackend, NativeCUDASparseLinearAlgebraDoubleBackend, NativeCUDASparseLinearAlgebraFloatBackend, NativeCUDATensorBackend, NativeCUDAVisionBackend, NativeFFMBLASComplexBackend, NativeFFMBLASRealBackend, NativeFFTBackend, NativeJavaCVMediaBackend, NativeJBulletBackend, NativeJzy3dPlot3DBackend, NativeMiniAudioBackend, NativeMPFRDenseLinearAlgebraBackend, NativeMPFRSparseLinearAlgebraBackend, NativeND4JCUDASparseTensorBackend, NativeND4JCUDATensorBackend, NativeND4JLinearAlgebraBackend, NativeND4JTensorBackend, NativeOpenCLDenseLinearAlgebraDoubleBackend, NativeOpenCLDenseLinearAlgebraFloatBackend, NativeOpenCLFFTBackend, NativeOpenCLLatticeBoltzmannBackend, NativeOpenCLNBodyBackend, NativeOpenCLSparseLinearAlgebraDoubleBackend, NativeOpenCLSparseLinearAlgebraFloatBackend, NativeOpenCLVisionBackend, NativeQuantumBackend, NativeSIMDComplexBackend, NativeSIMDRealBackend, NativeSimulationBackend, NativeVideoBackend, ND4JBaseTensorBackend, ODEBackend, ONNXBackend, ONNXRuntimeBackend, OpenMapBackend, PyMOLMolecularBackend, PythonQuantumBackend, QiskitAerBackend, QiskitBackend, Quantum4JBackend, SparkDistributedBackend, StandardLinearAlgebraProvider, StrangeBackend, StrassenLinearAlgebraProvider, TarsosAudioBackend, UnfoldingMapBackend, VLCJMediaBackend, VMDMolecularBackend, XChartPlot2DBackend
public interface Backend
Base interface for discoverable backend providers.
Used by ServiceLoader to dynamically discover available backends
(plotting, molecular visualization, computation, etc.).
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Method Summary
Modifier and TypeMethodDescriptionCreates and returns the backend instance (or returns self if it is the backend).default List<AlgorithmProvider> Returns theAlgorithmProviders exposed by this backend.Returns a description of the backend.getId()Returns the unique identifier for this backend (e.g., "javafx", "jmol", "cuda").getName()Returns the display name for UI presentation.default intReturns the priority for auto-selection (higher = preferred).default StringReturns a human-readable status message for this backend.getType()Returns the backend type category (e.g., "plotting", "molecular", "tensor", "math").default booleanChecks if this backend is currently available (libraries loaded, etc.).default booleanChecks if this backend is specifically disabled via a system property:"episteme.backend.disable." + getId().default voidshutdown()Called when the application is shutting down or the backend is being replaced.
-
Method Details
-
getType
String getType()Returns the backend type category (e.g., "plotting", "molecular", "tensor", "math"). -
getId
String getId()Returns the unique identifier for this backend (e.g., "javafx", "jmol", "cuda"). -
getName
String getName()Returns the display name for UI presentation. -
getDescription
String getDescription()Returns a description of the backend. -
isAvailable
default boolean isAvailable()Checks if this backend is currently available (libraries loaded, etc.).Default implementation checks
isExplicitlyDisabled()and returns false if it is. -
isExplicitlyDisabled
default boolean isExplicitlyDisabled()Checks if this backend is specifically disabled via a system property:"episteme.backend.disable." + getId().It also checks specialized properties like
"episteme.linearalgebra.disable." + getId().- Returns:
- true if explicitly disabled
-
getPriority
default int getPriority()Returns the priority for auto-selection (higher = preferred). Used when multiple backends are available. -
createBackend
Object createBackend()Creates and returns the backend instance (or returns self if it is the backend).- Returns:
- The backend implementation object
-
getAlgorithmProviders
Returns theAlgorithmProviders exposed by this backend.This bridges the Backend discovery system (ServiceLoader<Backend>) with the Algorithm discovery system (ServiceLoader<AlgorithmProvider>), allowing
AlgorithmManagerto find providers registered through either path.Default implementation checks if
createBackend()returns an AlgorithmProvider instance.- Returns:
- list of algorithm providers (may be empty, never null)
-
getStatusMessage
Returns a human-readable status message for this backend. Useful for debugging "Unavailable" states.- Returns:
- status message (e.g., "Ready", "Native library missing", etc.)
-
shutdown
default void shutdown()Called when the application is shutting down or the backend is being replaced. Use this to release hardware resources, close file handles, or stop background threads.
-