Class AsyncJSONResolverService
- java.lang.Object
-
- com.djrapitops.plan.delivery.webserver.cache.AsyncJSONResolverService
-
@Singleton public class AsyncJSONResolverService extends java.lang.Object
Service for resolving json asynchronously in order to move database queries off server thread.
-
-
Constructor Summary
Constructors Constructor Description AsyncJSONResolverService(PlanConfig config, Processing processing, JSONStorage jsonStorage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> JSONStorage.StoredJSON
resolve(java.util.Optional<java.lang.Long> newerThanTimestamp, DataID dataID, ServerUUID serverUUID, java.util.function.Function<ServerUUID,T> creator)
<T> JSONStorage.StoredJSON
resolve(java.util.Optional<java.lang.Long> newerThanTimestamp, DataID dataID, java.util.function.Supplier<T> jsonCreator)
-
-
-
Constructor Detail
-
AsyncJSONResolverService
@Inject public AsyncJSONResolverService(PlanConfig config, Processing processing, JSONStorage jsonStorage)
-
-
Method Detail
-
resolve
public <T> JSONStorage.StoredJSON resolve(java.util.Optional<java.lang.Long> newerThanTimestamp, DataID dataID, ServerUUID serverUUID, java.util.function.Function<ServerUUID,T> creator)
-
resolve
public <T> JSONStorage.StoredJSON resolve(java.util.Optional<java.lang.Long> newerThanTimestamp, DataID dataID, java.util.function.Supplier<T> jsonCreator)
-
-