Package velox.api.layer1.common
Class Layer1GlobalStorage
java.lang.Object
velox.api.layer1.common.Layer1GlobalStorage
Global storage. Only use it if you don't have other more appropriate ways to
store the data. Layer1 modules should use
SettingsAccess instead.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Layer1GlobalStorage
public Layer1GlobalStorage()
-
-
Method Details
-
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
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
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
-