Class DefaultModelCache

java.lang.Object
org.apache.maven.repository.internal.DefaultModelCache
All Implemented Interfaces:
ModelCache

public class DefaultModelCache extends Object implements ModelCache
A model builder cache backed by the repository system cache.
  • Method Details

    • newInstance

      public static ModelCache newInstance(org.eclipse.aether.RepositorySystemSession session)
    • get

      public Object get(Source path, String tag)
      Description copied from interface: ModelCache
      Gets the specified data from the cache.
      Specified by:
      get in interface ModelCache
      Parameters:
      path - The path of the cache record, must not be null.
      tag - The tag of the cache record, must not be null.
      Returns:
      The requested data or null if none was present in the cache.
    • put

      public void put(Source path, String tag, Object data)
      Description copied from interface: ModelCache
      Puts the specified data into the cache.
      Specified by:
      put in interface ModelCache
      Parameters:
      path - The path of the cache record, must not be null.
      tag - The tag of the cache record, must not be null.
      data - The data to store in the cache, must not be null.
    • get

      public Object get(String groupId, String artifactId, String version, String tag)
      Description copied from interface: ModelCache
      Gets the specified data from the cache.
      Specified by:
      get in interface ModelCache
      Parameters:
      groupId - The group id of the cache record, must not be null.
      artifactId - The artifact id of the cache record, must not be null.
      version - The version of the cache record, must not be null.
      tag - The tag of the cache record, must not be null.
      Returns:
      The requested data or null if none was present in the cache.
    • put

      public void put(String groupId, String artifactId, String version, String tag, Object data)
      Description copied from interface: ModelCache
      Puts the specified data into the cache.
      Specified by:
      put in interface ModelCache
      Parameters:
      groupId - The group id of the cache record, must not be null.
      artifactId - The artifact id of the cache record, must not be null.
      version - The version of the cache record, must not be null.
      tag - The tag of the cache record, must not be null.
      data - The data to store in the cache, must not be null.
    • get

      protected Object get(Object key)
    • put

      protected void put(Object key, Object data)
    • computeIfAbsent

      public Object computeIfAbsent(String groupId, String artifactId, String version, String tag, Supplier<Supplier<?>> data)
      Specified by:
      computeIfAbsent in interface ModelCache
    • computeIfAbsent

      public Object computeIfAbsent(Source path, String tag, Supplier<Supplier<?>> data)
      Specified by:
      computeIfAbsent in interface ModelCache
    • computeIfAbsent

      protected Object computeIfAbsent(Object key, Supplier<Supplier<?>> data)