package io.realm.internal.async;

/**
 * Created by Nabil on 17/06/15.
 */
public class RetryPolicyFactory {
    public static RetryPolicy get(int mode, int maxNumberOfRetries) {
        switch (mode) {
            case RetryPolicy.MODE_NO_RETRY: {
                return new NoRetryPolicy();
            }
            case RetryPolicy.MODE_MAX_RETRY: {
                return new MaxRetryPolicy(maxNumberOfRetries);
            }
            case RetryPolicy.MODE_INDEFINITELY: {
                return new IndefinitelyRetryPolicy();
            }
            default:
                throw new IllegalArgumentException("Unsupported retry policy " + mode);
        }
    }
}

@@ -1,112 +1,1059 @@
-package io.realm.internal.async;%0A%0A/**%0A * Created by Nabil on 17/06/15.%0A */%0Apublic class RetryPolicyFactory %7B
+/*%0A * Copyright 2015 Realm Inc.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage io.realm.internal.async;%0A%0A/**%0A * Build a %7B@link RetryPolicy%7D%0A */%0Apublic class RetryPolicyFactory %7B%0A    /**%0A     * Return the appropriate %7B@link RetryPolicy%7D%0A     * @param mode one of the supported mode in %7B@link RetryPolicy%7D%0A     * @param maxNumberOfRetries how many times we should retry before giving up%0A     *                           (not applicable for %7B@link RetryPolicy#MODE_INDEFINITELY%7D)%0A     * @return new instance of %7B@code RetryPolicy%7D%0A     */
 %0A   

add missing Copyright