CachedGradleOperation (Grails 6.0.0)

Package: org.grails.cli.gradle.cache

## [Groovy] Class CachedGradleOperation<T>

- org.grails.cli.gradle.cache.CachedGradleOperation

- All Implemented Interfaces and Traits:
    java.util.concurrent.Callable<T>

      @groovy.transform.CompileStatic
      abstract class CachedGradleOperation<T>
      extends java.lang.Object
      implements java.util.concurrent.Callable<T>

  Utility class for performing cached operations that retrieve data from Gradle. Since these operations are expensive we want to cache the data to avoid unnecessarily calling Gradle

  Authors:
    Graeme Rocher
  Since:
    3.0

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected java.lang.String` | `fileName` |
    `protected ProjectContext` | `projectContext` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `CachedGradleOperation (ProjectContext projectContext, java.lang.String fileName)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `T` | `call()`
    `` | `abstract T` | `readFromCached(java.io.File f)`
    `` | `abstract T` | `readFromGradle(org.gradle.tooling.ProjectConnection connection)`
    `` | `protected void` | `storeData(T data)`
    `` | `void` | `updateStatusMessage()`
    `` | `abstract void` | `writeToCache(java.io.PrintWriter writer, T data)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Field Detail

    - #### protected java.lang.String fileName

    - #### protected ProjectContext projectContext

  - ### Constructor Detail

    - #### CachedGradleOperation(ProjectContext projectContext, java.lang.String fileName)

  - ### Method Detail

    - #### @java.lang.Override T call()

    - #### abstract T readFromCached(java.io.File f)

    - #### abstract T readFromGradle(org.gradle.tooling.ProjectConnection connection)

    - #### protected void storeData(T data)

    - #### void updateStatusMessage()

    - #### abstract void writeToCache(java.io.PrintWriter writer, T data)