Interface JSONStorage
-
- All Superinterfaces:
SubSystem
- All Known Implementing Classes:
JSONFileStorage
,JSONMemoryStorageShim
public interface JSONStorage extends SubSystem
In charge of storing json somewhere for later retrieval.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
JSONStorage.StoredJSON
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
disable()
Performs disable actions for the subsystemdefault void
enable()
Performs enable actions for the subsystem.java.util.Optional<JSONStorage.StoredJSON>
fetchExactJson(java.lang.String identifier, long timestamp)
java.util.Optional<JSONStorage.StoredJSON>
fetchJSON(java.lang.String identifier)
java.util.Optional<JSONStorage.StoredJSON>
fetchJsonMadeAfter(java.lang.String identifier, long timestamp)
java.util.Optional<JSONStorage.StoredJSON>
fetchJsonMadeBefore(java.lang.String identifier, long timestamp)
void
invalidateOlder(java.lang.String identifier, long timestamp)
default JSONStorage.StoredJSON
storeJson(java.lang.String identifier, java.lang.Object json)
default JSONStorage.StoredJSON
storeJson(java.lang.String identifier, java.lang.Object json, long timestamp)
default JSONStorage.StoredJSON
storeJson(java.lang.String identifier, java.lang.String json)
JSONStorage.StoredJSON
storeJson(java.lang.String identifier, java.lang.String json, long timestamp)
-
-
-
Method Detail
-
enable
default void enable()
Description copied from interface:SubSystem
Performs enable actions for the subsystem.
-
disable
default void disable()
Description copied from interface:SubSystem
Performs disable actions for the subsystem
-
storeJson
default JSONStorage.StoredJSON storeJson(java.lang.String identifier, java.lang.String json)
-
storeJson
default JSONStorage.StoredJSON storeJson(java.lang.String identifier, java.lang.Object json)
-
storeJson
JSONStorage.StoredJSON storeJson(java.lang.String identifier, java.lang.String json, long timestamp)
-
storeJson
default JSONStorage.StoredJSON storeJson(java.lang.String identifier, java.lang.Object json, long timestamp)
-
fetchJSON
java.util.Optional<JSONStorage.StoredJSON> fetchJSON(java.lang.String identifier)
-
fetchExactJson
java.util.Optional<JSONStorage.StoredJSON> fetchExactJson(java.lang.String identifier, long timestamp)
-
fetchJsonMadeBefore
java.util.Optional<JSONStorage.StoredJSON> fetchJsonMadeBefore(java.lang.String identifier, long timestamp)
-
fetchJsonMadeAfter
java.util.Optional<JSONStorage.StoredJSON> fetchJsonMadeAfter(java.lang.String identifier, long timestamp)
-
invalidateOlder
void invalidateOlder(java.lang.String identifier, long timestamp)
-
-