Package com.google.gerrit.server.comment
Class CommentContextCacheImpl
java.lang.Object
com.google.gerrit.server.comment.CommentContextCacheImpl
- All Implemented Interfaces:
- CommentContextCache
Implementation of 
CommentContextCache.- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intComment context is expected to contain just few lines of code to be displayed beside the comment.
- 
Method SummaryModifier and TypeMethodDescriptionget(CommentContextKey comment) Returns the context lines for a single comment.com.google.common.collect.ImmutableMap<CommentContextKey,CommentContext> getAll(Iterable<CommentContextKey> inputKeys) Returns the context lines for multiple comments - identified by theirkeys.static com.google.inject.Modulemodule()
- 
Field Details- 
MAX_CONTEXT_PADDINGpublic static final int MAX_CONTEXT_PADDINGComment context is expected to contain just few lines of code to be displayed beside the comment. Setting an upper bound of 100 for padding.- See Also:
 
 
- 
- 
Method Details- 
modulepublic static com.google.inject.Module module()
- 
getDescription copied from interface:CommentContextCacheReturns the context lines for a single comment. Works for published and draft comments.- Specified by:
- getin interface- CommentContextCache
- Parameters:
- comment- a key representing a subset of fields for a comment that serves as an identifier.
- Returns:
- a CommentContextobject containing all line numbers and text of the context.
 
- 
getAllpublic com.google.common.collect.ImmutableMap<CommentContextKey,CommentContext> getAll(Iterable<CommentContextKey> inputKeys) Description copied from interface:CommentContextCacheReturns the context lines for multiple comments - identified by theirkeys. Works for published and draft comments.- Specified by:
- getAllin interface- CommentContextCache
- Parameters:
- inputKeys- 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:
- Mapof- CommentContextcontaining the context for all comments.
 
 
-