Class StreamingCommentsRetriever
java.lang.Object
com.atlassian.jira.issue.comments.StreamingCommentsRetriever
This class is used to ensure that all the comments for a given issue are not loaded into memory.
- Since:
- 7.2
-
Field Summary
-
Constructor Summary
ConstructorDescriptionStreamingCommentsRetriever
(QueryDslAccessor queryDslAccessor, CommentPermissionManager commentPermissionManager, DatabaseConfigurationManager databaseConfigurationManager, ActionDTOToCommentConverter converter) -
Method Summary
Modifier and TypeMethodDescriptionstream
(ApplicationUser user, Issue issue) This method iterates over each comment of the given issue and executes a callback on it.
-
Field Details
-
COMMENTS_FETCH_SIZE
public static final int COMMENTS_FETCH_SIZE- See Also:
-
-
Constructor Details
-
StreamingCommentsRetriever
public StreamingCommentsRetriever(QueryDslAccessor queryDslAccessor, CommentPermissionManager commentPermissionManager, DatabaseConfigurationManager databaseConfigurationManager, ActionDTOToCommentConverter converter)
-
-
Method Details
-
stream
This method iterates over each comment of the given issue and executes a callback on it. Comments are iterated over in the order that they were created in, and those that are not visible to the logged in user are filtered out.- Parameters:
user
-issue
- issue for which to fetch comments- Returns:
- the total number of visible comments for the issue
-