Class CachedResource<R>

java.lang.Object
io.github.thecsdev.tcdcommons.api.util.io.cache.CachedResource<R>

public final class CachedResource<R> extends Object
Provides information about a resource that has successfully been fetched via IResourceFetchTask.fetchResourceSync().
  • Constructor Details

    • CachedResource

      public CachedResource(R resource, long resourceSizeB, Instant expirationDate) throws NullPointerException
      Creates an instance of CachedResource.
      Parameters:
      resource - The resource that is being cached.
      resourceSizeB - The amount of space the resource takes up in RAM, in bytes.
      expirationDate - The time in the future, at which the resource will expire.
      Throws:
      NullPointerException - If an argument is null.
  • Method Details