Class JSONFileStorage
- java.lang.Object
-
- com.djrapitops.plan.delivery.webserver.cache.JSONFileStorage
-
- All Implemented Interfaces:
JSONStorage
,SubSystem
@Singleton public class JSONFileStorage extends java.lang.Object implements JSONStorage
In charge of storing json files on disk for later retrieval.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JSONFileStorage.CleanTask
-
Nested classes/interfaces inherited from interface com.djrapitops.plan.delivery.webserver.cache.JSONStorage
JSONStorage.StoredJSON
-
-
Constructor Summary
Constructors Constructor Description JSONFileStorage(PlanFiles files, Formatters formatters, net.playeranalytics.plugin.server.PluginLogger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)
JSONStorage.StoredJSON
storeJson(java.lang.String identifier, java.lang.String json, long timestamp)
-
-
-
Constructor Detail
-
JSONFileStorage
@Inject public JSONFileStorage(PlanFiles files, Formatters formatters, net.playeranalytics.plugin.server.PluginLogger logger)
-
-
Method Detail
-
storeJson
public JSONStorage.StoredJSON storeJson(java.lang.String identifier, java.lang.String json, long timestamp)
- Specified by:
storeJson
in interfaceJSONStorage
-
fetchJSON
public java.util.Optional<JSONStorage.StoredJSON> fetchJSON(java.lang.String identifier)
- Specified by:
fetchJSON
in interfaceJSONStorage
-
fetchExactJson
public java.util.Optional<JSONStorage.StoredJSON> fetchExactJson(java.lang.String identifier, long timestamp)
- Specified by:
fetchExactJson
in interfaceJSONStorage
-
fetchJsonMadeBefore
public java.util.Optional<JSONStorage.StoredJSON> fetchJsonMadeBefore(java.lang.String identifier, long timestamp)
- Specified by:
fetchJsonMadeBefore
in interfaceJSONStorage
-
fetchJsonMadeAfter
public java.util.Optional<JSONStorage.StoredJSON> fetchJsonMadeAfter(java.lang.String identifier, long timestamp)
- Specified by:
fetchJsonMadeAfter
in interfaceJSONStorage
-
invalidateOlder
public void invalidateOlder(java.lang.String identifier, long timestamp)
- Specified by:
invalidateOlder
in interfaceJSONStorage
-
-