1/*
2 * Copyright 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package androidx.work;
18
19/**
20 * An enum that determines what to do with existing {@link PeriodicWorkRequest}s with the same
21 * unique name in case of a collision.
22 */
23public enum ExistingPeriodicWorkPolicy {
24
25    /**
26     * If there is existing pending work with the same unique name, cancel and delete it.  Then,
27     * insert the newly-specified work.
28     */
29    REPLACE,
30
31    /**
32     * If there is existing pending work with the same unique name, do nothing.  Otherwise, insert
33     * the newly-specified work.
34     */
35    KEEP
36}
37