Interface Persistence
- All Known Implementing Classes:
PersistenceImpl
public interface Persistence
Interface defining the methods for storing and retrieving values from the Transformers persistence store
The persistence implementation requires the following table to be present in the database the persistence module is configured to connect to.
CREATE TABLE if not exists TF_LEGACY_PERSISTENCE (
JTM_KEY TEXT PRIMARY KEY NOT NULL,
JTM_VALUE TEXT
);
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addChangeListener
(String prefix, PersistenceChangeListener listener) Deprecated.This feature was removed in Transformer 7.0void
Delete a key from the databaseRetreive afrom Transformers persistence store
void
put
(PersistedValue persistedValue) Store a value, multiple puts with the same key will override previously stored valuesQuery for all entries whose keys start with the query
-
Method Details
-
put
Store a value, multiple puts with the same key will override previously stored values
- Parameters:
persistedValue
- value to be stored
-
get
Retreive a
from Transformers persistence store
- Parameters:
key
- The key associated with the entry- Returns:
- The persisted value if it exists, null otherwise
-
query
Query for all entries whose keys start with the query
- Parameters:
query
- prefix to query for- Returns:
- Array of
PersistedValue
objects. Never null
-
delete
Delete a key from the database
- Parameters:
key
- Key to delete
-
addChangeListener
Deprecated.This feature was removed in Transformer 7.0Does nothing
- Parameters:
prefix
- Prefix of keys we're interested inlistener
- Object to be called when data changes
-