Class CcrClient

    • Method Detail

      • putFollow

        public PutFollowResponse putFollow​(PutFollowRequest request,
                                           RequestOptions options)
                                    throws java.io.IOException
        Executes the put follow api, which creates a follower index and then the follower index starts following the leader index. See the docs for more.
        Parameters:
        request - the request
        options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
        Returns:
        the response
        Throws:
        java.io.IOException - in case there is a problem sending the request or parsing back the response
      • putFollowAsync

        public void putFollowAsync​(PutFollowRequest request,
                                   RequestOptions options,
                                   ActionListener<PutFollowResponse> listener)
        Asynchronously executes the put follow api, which creates a follower index and then the follower index starts following the leader index. See the docs for more.
        Parameters:
        request - the request
        options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
        listener - the listener to be notified upon request completion
      • pauseFollow

        public AcknowledgedResponse pauseFollow​(PauseFollowRequest request,
                                                RequestOptions options)
                                         throws java.io.IOException
        Instructs a follower index to pause the following of a leader index. See the docs for more.
        Parameters:
        request - the request
        options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
        Returns:
        the response
        Throws:
        java.io.IOException - in case there is a problem sending the request or parsing back the response
      • resumeFollow

        public AcknowledgedResponse resumeFollow​(ResumeFollowRequest request,
                                                 RequestOptions options)
                                          throws java.io.IOException
        Instructs a follower index to resume the following of a leader index. See the docs for more.
        Parameters:
        request - the request
        options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
        Returns:
        the response
        Throws:
        java.io.IOException - in case there is a problem sending the request or parsing back the response
      • unfollow

        public AcknowledgedResponse unfollow​(UnfollowRequest request,
                                             RequestOptions options)
                                      throws java.io.IOException
        Instructs a follower index to unfollow and become a regular index. Note that index following needs to be paused and the follower index needs to be closed. See the docs for more.
        Parameters:
        request - the request
        options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
        Returns:
        the response
        Throws:
        java.io.IOException - in case there is a problem sending the request or parsing back the response
      • unfollowAsync

        public void unfollowAsync​(UnfollowRequest request,
                                  RequestOptions options,
                                  ActionListener<AcknowledgedResponse> listener)
        Asynchronously instructs a follower index to unfollow and become a regular index. Note that index following needs to be paused and the follower index needs to be closed. See the docs for more.
        Parameters:
        request - the request
        options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
        listener - the listener to be notified upon request completion
      • forgetFollower

        public BroadcastResponse forgetFollower​(ForgetFollowerRequest request,
                                                RequestOptions options)
                                         throws java.io.IOException
        Instructs an index acting as a leader index to forget the specified follower index. See the docs for more details on the intended usage of this API.
        Parameters:
        request - the request
        options - the request options (e.g., headers), use RequestOptions.DEFAULT if the defaults are acceptable.
        Returns:
        the response
        Throws:
        java.io.IOException - if an I/O exception occurs while executing this request
      • putAutoFollowPattern

        public AcknowledgedResponse putAutoFollowPattern​(PutAutoFollowPatternRequest request,
                                                         RequestOptions options)
                                                  throws java.io.IOException
        Stores an auto follow pattern. See the docs for more.
        Parameters:
        request - the request
        options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
        Returns:
        the response
        Throws:
        java.io.IOException - in case there is a problem sending the request or parsing back the response
      • deleteAutoFollowPattern

        public AcknowledgedResponse deleteAutoFollowPattern​(DeleteAutoFollowPatternRequest request,
                                                            RequestOptions options)
                                                     throws java.io.IOException
        Deletes an auto follow pattern. See the docs for more.
        Parameters:
        request - the request
        options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
        Returns:
        the response
        Throws:
        java.io.IOException - in case there is a problem sending the request or parsing back the response
      • getCcrStats

        public CcrStatsResponse getCcrStats​(CcrStatsRequest request,
                                            RequestOptions options)
                                     throws java.io.IOException
        Gets all CCR stats. See the docs for more.
        Parameters:
        request - the request
        options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
        Returns:
        the response
        Throws:
        java.io.IOException - in case there is a problem sending the request or parsing back the response
      • getFollowStats

        public FollowStatsResponse getFollowStats​(FollowStatsRequest request,
                                                  RequestOptions options)
                                           throws java.io.IOException
        Gets follow stats for specific indices. See the docs for more.
        Parameters:
        request - the request
        options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
        Returns:
        the response
        Throws:
        java.io.IOException - in case there is a problem sending the request or parsing back the response
      • getFollowInfo

        public FollowInfoResponse getFollowInfo​(FollowInfoRequest request,
                                                RequestOptions options)
                                         throws java.io.IOException
        Gets follow info for specific indices. See the docs for more.
        Parameters:
        request - the request
        options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
        Returns:
        the response
        Throws:
        java.io.IOException - in case there is a problem sending the request or parsing back the response