Class UserPreferences
java.lang.Object
org.episteme.core.io.UserPreferences
User preferences manager with file-based persistence.
Stores user preferences in the user's home directory.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Method Summary
Modifier and TypeMethodDescriptionGets a preference value.Gets a preference value with default.Gets the auto-tuning mode (ON, OFF, AUTO).Gets the compute backend (cpu, opencl, cuda).intGets the number of compute threads.static UserPreferencesintGets an integer preference value with default.Gets the UI language (default from episteme.properties).Gets a read-only view of all persistent preferences.Returns the path to the preferences file.getPreferredBackend(String backendType) Gets the preferred backend for a given type.getTheme()Gets the UI theme (default from episteme.properties).booleanGets whether auto-tuning is enabled.booleanChecks if a backend is manually deactivated.booleanGets whether GPU compute is enabled.voidsave()Saves preferences to file.voidSets a preference value and saves immediately.voidsetAutoTuningEnabled(boolean enabled) Sets whether auto-tuning is enabled.voidsetAutoTuningMode(String mode) Sets the auto-tuning mode.voidsetBackendDeactivated(String id, boolean deactivate) Sets whether a backend is manually deactivated.voidsetComputeBackend(String backend) Sets the compute backend.voidsetComputeThreads(int threads) Sets the number of compute threads.voidsetGpuEnabled(boolean enabled) Sets whether GPU compute is enabled.voidSets an integer preference value.voidsetLanguage(String language) Sets the UI language.voidsetPreferredBackend(String backendType, String backendId) Sets the preferred backend for a given type.voidSets the UI theme.
-
Field Details
-
KEY_MAP_BACKEND
- See Also:
-
KEY_NETWORK_BACKEND
- See Also:
-
KEY_PLOTTING_BACKEND
- See Also:
-
KEY_MOLECULAR_BACKEND
- See Also:
-
KEY_QUANTUM_BACKEND
- See Also:
-
KEY_BACKEND_DEACTIVATED
- See Also:
-
KEY_AUTO_TUNING_MODE
- See Also:
-
KEY_AUTO_TUNING_ENABLED
- See Also:
-
KEY_LANGUAGE
- See Also:
-
KEY_THEME
- See Also:
-
KEY_COMPUTE_BACKEND
- See Also:
-
KEY_COMPUTE_THREADS
- See Also:
-
KEY_COMPUTE_GPU_ENABLED
- See Also:
-
KEY_COMPUTE_OPENCL_DEVICE
- See Also:
-
KEY_COMPUTE_CUDA_DEVICE
- See Also:
-
-
Method Details
-
getInstance
-
get
-
get
-
set
-
getPreferredBackend
-
setPreferredBackend
-
getInt
Gets an integer preference value with default. -
setInt
Sets an integer preference value. -
save
public void save()Saves preferences to file. -
getPreferencesPath
Returns the path to the preferences file. -
getLanguage
Gets the UI language (default from episteme.properties). -
setLanguage
Sets the UI language. -
getTheme
Gets the UI theme (default from episteme.properties). -
setTheme
Sets the UI theme. -
getComputeBackend
Gets the compute backend (cpu, opencl, cuda). -
setComputeBackend
Sets the compute backend. -
getComputeThreads
public int getComputeThreads()Gets the number of compute threads. -
setComputeThreads
public void setComputeThreads(int threads) Sets the number of compute threads. -
isGpuEnabled
public boolean isGpuEnabled()Gets whether GPU compute is enabled. -
setGpuEnabled
public void setGpuEnabled(boolean enabled) Sets whether GPU compute is enabled. -
getPreferencesMap
-
getAutoTuningMode
Gets the auto-tuning mode (ON, OFF, AUTO). -
setAutoTuningMode
Sets the auto-tuning mode. -
isBackendDeactivated
Checks if a backend is manually deactivated. -
setBackendDeactivated
Sets whether a backend is manually deactivated. -
isAutoTuningEnabled
public boolean isAutoTuningEnabled()Gets whether auto-tuning is enabled. -
setAutoTuningEnabled
public void setAutoTuningEnabled(boolean enabled) Sets whether auto-tuning is enabled.
-