Class DefaultModelCache

  • All Implemented Interfaces:
    ModelCache

    class DefaultModelCache
    extends java.lang.Object
    implements ModelCache
    A model builder cache backed by the repository system cache.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      (package private) static class  DefaultModelCache.Key  
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.eclipse.aether.RepositoryCache cache  
      private org.eclipse.aether.RepositorySystemSession session  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private DefaultModelCache​(org.eclipse.aether.RepositorySystemSession session)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object get​(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String tag)
      Gets the specified data from the cache.
      static ModelCache newInstance​(org.eclipse.aether.RepositorySystemSession session)  
      void put​(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String tag, java.lang.Object data)
      Puts the specified data into the cache.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • session

        private final org.eclipse.aether.RepositorySystemSession session
      • cache

        private final org.eclipse.aether.RepositoryCache cache
    • Constructor Detail

      • DefaultModelCache

        private DefaultModelCache​(org.eclipse.aether.RepositorySystemSession session)
    • Method Detail

      • newInstance

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

        public java.lang.Object get​(java.lang.String groupId,
                                    java.lang.String artifactId,
                                    java.lang.String version,
                                    java.lang.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​(java.lang.String groupId,
                        java.lang.String artifactId,
                        java.lang.String version,
                        java.lang.String tag,
                        java.lang.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.