
com.jetbrains.pluginverifier.repository.cache.ResourceCacheEntryResult.kt Maven / Gradle / Ivy
/*
* Copyright 2000-2020 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
*/
package com.jetbrains.pluginverifier.repository.cache
import com.jetbrains.pluginverifier.repository.resources.ResourceWeight
/**
* Represents possible results of fetching the resources from the [ResourceCache].
*/
sealed class ResourceCacheEntryResult> {
/**
* The resource cache entry has been successfully fetched.
* The entry must be closed after the resource is used in order to
* release the associated lock in the [ResourceCache].
*/
data class Found>(val resourceCacheEntry: ResourceCacheEntry) : ResourceCacheEntryResult()
/**
* The resource cache entry was not fetched because the [error] had been thrown.
*/
data class Failed>(val message: String, val error: Throwable) : ResourceCacheEntryResult()
/**
* The resource cache entry was not fetched because it had not been found by the provider given to the [ResourceCache].
*/
data class NotFound>(val message: String) : ResourceCacheEntryResult()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy