Enum RefreshPolicy

    • Enum Constant Detail

      • NONE

        public static final RefreshPolicy NONE
        Don't refresh after this request. The default.
      • IMMEDIATE

        public static final RefreshPolicy IMMEDIATE
        Force a refresh as part of this request. This refresh policy does not scale for high indexing or search throughput but is useful to present a consistent view to for indices with very low traffic. And it is wonderful for tests!
      • WAIT_UNTIL

        public static final RefreshPolicy WAIT_UNTIL
        Leave this request open until a refresh has made the contents of this request visible to search. This refresh policy is compatible with high indexing and search throughput but it causes the request to wait to reply until a refresh occurs.
    • Method Detail

      • values

        public static RefreshPolicy[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (RefreshPolicy c : RefreshPolicy.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static RefreshPolicy valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getValue

        public String getValue()
      • getDefault

        public static RefreshPolicy getDefault()
        Get the default refresh policy, which is NONE