Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 24 for DefaultOption (0.27 sec)

  1. platforms/core-runtime/daemon-services/src/main/java/org/gradle/api/internal/tasks/userinput/NonInteractiveUserInputHandler.java

                return this;
            }
    
            @Override
            public Choice<T> defaultOption(T defaultOption) {
                this.defaultOption = defaultOption;
                return this;
            }
    
            @Override
            public Choice<T> whenNotConnected(T defaultOption) {
                this.defaultOption = defaultOption;
                return this;
            }
    
            @Override
            public T ask() {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 09 04:50:46 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  2. platforms/core-runtime/daemon-services/src/main/java/org/gradle/api/internal/tasks/userinput/DefaultUserInputHandler.java

                return this;
            }
    
            @Override
            public Choice<T> defaultOption(T defaultOption) {
                this.defaultOption = defaultOption;
                return this;
            }
    
            @Override
            public Choice<T> whenNotConnected(T defaultOption) {
                // Ignore
                return this;
            }
    
            @Override
            public T ask() {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 09 04:50:46 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  3. platforms/core-runtime/logging/src/main/java/org/gradle/internal/logging/events/SelectOptionPromptEvent.java

        private final String question;
        private final List<String> options;
        private final int defaultOption;
    
        public SelectOptionPromptEvent(long timestamp, String question, List<String> options, int defaultOption) {
            super(timestamp);
            this.question = question;
            this.options = options;
            this.defaultOption = defaultOption;
        }
    
        public String getQuestion() {
            return question;
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue May 28 12:11:05 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  4. platforms/core-runtime/daemon-services/src/main/java/org/gradle/api/internal/tasks/userinput/Choice.java

         *
         * @return this
         */
        Choice<T> defaultOption(T defaultOption);
    
        /**
         * Specifies the option to use when not connected to a console. This can be different to the default option presented to the user.
         *
         * @return this
         */
        Choice<T> whenNotConnected(T defaultOption);
    
        /**
         * Specifies how to display each option.
         *
         * @return this
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 09 04:50:46 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  5. pkg/backoff/exponential_test.go

    	"time"
    
    	"istio.io/istio/pkg/test/util/assert"
    )
    
    func TestBackOff(t *testing.T) {
    	var (
    		testInitialInterval = 500 * time.Millisecond
    		testMaxInterval     = 5 * time.Second
    	)
    
    	o := DefaultOption()
    	o.InitialInterval = testInitialInterval
    	o.MaxInterval = testMaxInterval
    	exp := NewExponentialBackOff(o)
    	exp.(ExponentialBackOff).exponentialBackOff.Multiplier = 2
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Sep 05 16:03:30 UTC 2022
    - 2.6K bytes
    - Viewed (0)
  6. pkg/keepalive/options_test.go

    func TestAgeDefaultsToInfinite(t *testing.T) {
    	ko := keepalive.DefaultOption()
    
    	if ko.MaxServerConnectionAge != keepalive.Infinity {
    		t.Errorf("%s maximum connection age %v", t.Name(), ko.MaxServerConnectionAge)
    	}
    }
    
    // Confirm maximum connection age parameters can be set from the command line.
    func TestSetConnectionAgeCommandlineOptions(t *testing.T) {
    	ko := keepalive.DefaultOption()
    	cmd := &cobra.Command{}
    	ko.AttachCobraFlags(cmd)
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jun 29 15:00:10 UTC 2020
    - 1.6K bytes
    - Viewed (0)
  7. pkg/keepalive/options.go

    func (o *Options) ConvertToClientOption() grpc.DialOption {
    	return grpc.WithKeepaliveParams(keepalive.ClientParameters{
    		Time:    o.Time,
    		Timeout: o.Timeout,
    	})
    }
    
    // DefaultOption returns the default keepalive options.
    func DefaultOption() *Options {
    	return &Options{
    		Time:                        grpcKeepaliveInterval,
    		Timeout:                     grpcKeepaliveTimeout,
    		MaxServerConnectionAge:      Infinity,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  8. platforms/core-runtime/daemon-services/src/main/java/org/gradle/api/internal/tasks/userinput/UserQuestions.java

         *
         * @param question The text of the question.
         * @param defaultOption The option to present to the user as the default selection, and also the value to use when not connected to a console.
         * @return the answer or the default if not connected to a console.
         */
        <T> T selectOption(String question, Collection<T> options, T defaultOption);
    
        /**
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 09 04:50:46 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  9. platforms/core-runtime/daemon-services/src/test/groovy/org/gradle/api/internal/tasks/userinput/DefaultUserInputHandlerTest.groovy

            1 * outputEventBroadcaster.onOutput(_) >> { SelectOptionPromptEvent event ->
                assert event.question == "select option"
                assert event.options == ["11", "12", "13"]
                assert event.defaultOption == 1
            }
            1 * userInputReader.readInput() >> new UserInputReader.TextResponse("2")
            1 * outputEventBroadcaster.onOutput(_ as UserInputResumeEvent)
            0 * outputEventBroadcaster._
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 09 04:50:46 UTC 2024
    - 14.9K bytes
    - Viewed (0)
  10. platforms/core-runtime/daemon-services/src/test/groovy/org/gradle/api/internal/tasks/userinput/NonInteractiveUserInputHandlerTest.groovy

                .ask() == 1
        }
    
        def "returns default option for choice"() {
            expect:
            userInputHandler.choice('Select count', [1, 2, 3])
                .defaultOption(2)
                .ask() == 2
            userInputHandler.choice('Select count', [1, 2, 3])
                .whenNotConnected(2)
                .ask() == 2
        }
    
        def "ignores option renderer"() {
            expect:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 09 04:50:46 UTC 2024
    - 2.2K bytes
    - Viewed (0)
Back to top