Interface CommentContextCache

All Known Implementing Classes:
CommentContextCacheImpl

public interface CommentContextCache
Caches the context lines of comments (source file content surrounding and including the lines where the comment was written)
  • Method Details

    • get

      Returns the context lines for a single comment. Works for published and draft comments.
      Parameters:
      key - a key representing a subset of fields for a comment that serves as an identifier.
      Returns:
      a CommentContext object containing all line numbers and text of the context.
    • getAll

      com.google.common.collect.ImmutableMap<CommentContextKey,CommentContext> getAll(Iterable<CommentContextKey> keys)
      Returns the context lines for multiple comments - identified by their keys. Works for published and draft comments.
      Parameters:
      keys - list of keys, where each key represents a single comment through its project, change ID, patchset, path and ID. The keys can belong to different projects and changes.
      Returns:
      Map of CommentContext containing the context for all comments.