Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for loadOrCreateModel (0.2 sec)

  1. platforms/core-configuration/configuration-cache/src/main/kotlin/org/gradle/internal/cc/impl/ConfigurationCacheAwareBuildTreeModelCreator.kt

            cache.maybePrepareModel {
                delegate.beforeTasks(action)
            }
        }
    
        override fun <T : Any?> fromBuildModel(action: BuildTreeModelAction<out T>): T? {
            return cache.loadOrCreateModel {
                val model = delegate.fromBuildModel(action)
                if (model == null) BuildTreeModel.NullModel else BuildTreeModel.Model(model)
            }.result()
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Jun 08 11:29:25 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  2. platforms/core-configuration/configuration-cache/src/main/kotlin/org/gradle/internal/cc/impl/BuildTreeConfigurationCache.kt

        fun maybePrepareModel(action: () -> Unit)
    
        /**
         * Loads the cached model, if available, or else runs the given function to create it and then writes the result to the cache.
         */
        fun <T : Any> loadOrCreateModel(creator: () -> T): T
    
        /**
         * Loads a cached intermediate model, if available, or else runs the given function to create it and then writes the result to the cache.
         *
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Jun 08 11:29:25 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  3. platforms/core-configuration/configuration-cache/src/main/kotlin/org/gradle/internal/cc/impl/DefaultConfigurationCache.kt

            if (isLoaded) {
                return
            }
            runWorkThatContributesToCacheEntry {
                action()
            }
        }
    
        override fun <T : Any> loadOrCreateModel(creator: () -> T): T {
            if (isLoaded) {
                runLoadedSideEffects()
                return loadModel().uncheckedCast()
            }
    
            return runWorkThatContributesToCacheEntry {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Jun 08 11:29:30 UTC 2024
    - 24.3K bytes
    - Viewed (0)
Back to top