Package gg.xp.xivsupport.persistence
Class BaseStringPersistenceProvider
java.lang.Object
gg.xp.xivsupport.persistence.BaseStringPersistenceProvider
- All Implemented Interfaces:
PersistenceProvider
- Direct Known Subclasses:
InMemoryMapPersistenceProvider
,PropertiesFilePersistenceProvider
,SimplifiedPropertiesFilePersistenceProvider
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clearAll()
protected abstract void
void
protected abstract void
deleteValue
(@NotNull String key) <X> X
<X> X
@Nullable String
protected abstract @Nullable String
protected String
rewriteKey
(String originalKey) Since not every format may be able to handle every cdKey correctly, provide an optional way to massage the cdKey into a better format (e.g.void
void
protected abstract void
-
Constructor Details
-
BaseStringPersistenceProvider
public BaseStringPersistenceProvider()
-
-
Method Details
-
save
- Specified by:
save
in interfacePersistenceProvider
-
get
- Specified by:
get
in interfacePersistenceProvider
-
get
public <X> X get(@NotNull @NotNull String key, @NotNull @NotNull com.fasterxml.jackson.core.type.TypeReference<X> type, @Nullable X dflt) - Specified by:
get
in interfacePersistenceProvider
-
getRaw
-
saveRaw
-
clearAll
public void clearAll()- Specified by:
clearAll
in interfacePersistenceProvider
-
delete
- Specified by:
delete
in interfacePersistenceProvider
-
rewriteKey
Since not every format may be able to handle every cdKey correctly, provide an optional way to massage the cdKey into a better format (e.g. stripping special characters)- Parameters:
originalKey
- Original cdKey- Returns:
- Massaged cdKey
-
setValue
-
deleteValue
-
getValue
-
clearAllValues
protected abstract void clearAllValues()
-