Class AbstractHeapCachingService

    • Constructor Detail

      • AbstractHeapCachingService

        public AbstractHeapCachingService()
    • Method Detail

      • editPostInCache

        public void editPostInCache​(int postId,
                                    String text)
        Description copied from class: AbstractCachingService
        Either edits the text of the Post in the Cache, or invalidates the Post
        Specified by:
        editPostInCache in class AbstractCachingService
        Parameters:
        postId - ID of the Post being edited
        text - New text of the Post
      • likePostInCache

        public void likePostInCache​(int postId,
                                    int userId)
        Description copied from class: AbstractCachingService
        Either adds a Like to the Post in the Cache, or invalidates the Post
        Specified by:
        likePostInCache in class AbstractCachingService
        Parameters:
        postId - ID of the Post being liked
        userId - ID of the User the liked the Post
      • unlikePostInCache

        public void unlikePostInCache​(int postId,
                                      int userId)
        Description copied from class: AbstractCachingService
        Either removes a Like in the Post in the Cache, or invalidates the Post
        Specified by:
        unlikePostInCache in class AbstractCachingService
        Parameters:
        postId - ID of the Post being unliked
        userId - ID of the User the unliked the Post
      • editCommentInCache

        public void editCommentInCache​(int commentId,
                                       String text)
        Description copied from class: AbstractCachingService
        Either edits the text of the Comment in the Cache, or invalidates the Comment
        Specified by:
        editCommentInCache in class AbstractCachingService
        Parameters:
        commentId - ID of the Comment being edited
        text - New text of the Comment
      • likeCommentInCache

        public void likeCommentInCache​(int commentId,
                                       int userId)
        Description copied from class: AbstractCachingService
        Either adds a Like to the Comment in the Cache, or invalidates the Comment
        Specified by:
        likeCommentInCache in class AbstractCachingService
        Parameters:
        commentId - ID of the Comment being liked
        userId - ID of the User the liked the Comment
      • unlikeCommentInCache

        public void unlikeCommentInCache​(int commentId,
                                         int userId)
        Description copied from class: AbstractCachingService
        Either removes a Like in the Comment in the Cache, or invalidates the Comment
        Specified by:
        unlikeCommentInCache in class AbstractCachingService
        Parameters:
        commentId - ID of the Comment being unliked
        userId - ID of the User the unliked the Comment