Package com.google.appengine.api.taskqueue

Examples of com.google.appengine.api.taskqueue.RetryOptions


                        throw new RuntimeException("The headers key/value pairs should be passed as a map.");
                    }
                    break;
                case "retryOptions":
                    if (value instanceof Map) {
                        RetryOptions retryOptions = RetryOptions.Builder.withDefaults();
                        for (Entry<String, Object> option : ((Map<String, Object>)value).entrySet()) {
                            switch (option.getKey()) {
                                case "taskRetryLimit":
                                    retryOptions.taskRetryLimit(((Number)option.getValue()).intValue());
                                    break;
                                case "taskAgeLimitSeconds":
                                    retryOptions.taskAgeLimitSeconds(((Number)option.getValue()).intValue());
                                    break;
                                case "minBackoffSeconds":
                                    retryOptions.minBackoffSeconds(((Number)option.getValue()).intValue());
                                    break;
                                case "maxBackoffSeconds":
                                    retryOptions.maxBackoffSeconds(((Number)option.getValue()).intValue());
                                    break;
                                case "maxDoublings":
                                    retryOptions.maxDoublings(((Number)option.getValue()).intValue());
                                    break;
                                default:
                                    throw new RuntimeException(option.getKey() + " is not a valid retry option parameter.");
                            }
                        }
View Full Code Here


    }

    @Test
    public void testRetryOption() {
        String testMethodTag = "testRetryOption";
        RetryOptions retryOptions = new RetryOptions(RetryOptions.Builder.withDefaults())
            .taskRetryLimit(5)
            .taskAgeLimitSeconds(10)
            .maxBackoffSeconds(10)
            .maxDoublings(10)
            .minBackoffSeconds(10);
View Full Code Here

TOP

Related Classes of com.google.appengine.api.taskqueue.RetryOptions

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.