Layer1GlobalStorage
Package: velox.api.layer1.common
Type: Class
Inheritance: java.lang.Object รขโ โ velox.api.layer1.common.Layer1GlobalStorage
Descriptionโ
Global storage. Only use it if you don't have other more appropriate ways to store the data. Layer1 modules should use SettingsAccess instead.
Constructorsโ
Layer1GlobalStorageโ
public Layer1GlobalStorage()
Methodsโ
setStorageCallbacksโ
public static void setStorageCallbacks(Function<String, String> valuesGetter, BiConsumer<String, String> valuesSetter)
Initialize storage backend. Invoked by Bookmap. Plugins should not call this method.
setโ
public static void set(String key, String value)
Store value globally.
Parameters:
key- Key to use. Must be unique and identifiable (e.g. prefix it with your module name).value- Value to store
getโ
public static String get(String key)
Load value from global storage
Parameters:
key- Key to use. Must be unique and identifiable (e.g. prefix it with your module name).
Returns: Previously stored value or null if not found