11bffc919a167a732f24cf4216664374087628e15Sumir Kataria/*
21bffc919a167a732f24cf4216664374087628e15Sumir Kataria * Copyright 2018 The Android Open Source Project
31bffc919a167a732f24cf4216664374087628e15Sumir Kataria *
41bffc919a167a732f24cf4216664374087628e15Sumir Kataria * Licensed under the Apache License, Version 2.0 (the "License");
51bffc919a167a732f24cf4216664374087628e15Sumir Kataria * you may not use this file except in compliance with the License.
61bffc919a167a732f24cf4216664374087628e15Sumir Kataria * You may obtain a copy of the License at
71bffc919a167a732f24cf4216664374087628e15Sumir Kataria *
81bffc919a167a732f24cf4216664374087628e15Sumir Kataria *      http://www.apache.org/licenses/LICENSE-2.0
91bffc919a167a732f24cf4216664374087628e15Sumir Kataria *
101bffc919a167a732f24cf4216664374087628e15Sumir Kataria * Unless required by applicable law or agreed to in writing, software
111bffc919a167a732f24cf4216664374087628e15Sumir Kataria * distributed under the License is distributed on an "AS IS" BASIS,
121bffc919a167a732f24cf4216664374087628e15Sumir Kataria * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
131bffc919a167a732f24cf4216664374087628e15Sumir Kataria * See the License for the specific language governing permissions and
141bffc919a167a732f24cf4216664374087628e15Sumir Kataria * limitations under the License.
151bffc919a167a732f24cf4216664374087628e15Sumir Kataria */
161bffc919a167a732f24cf4216664374087628e15Sumir Kataria
171bffc919a167a732f24cf4216664374087628e15Sumir Katariapackage androidx.work;
181bffc919a167a732f24cf4216664374087628e15Sumir Kataria
191bffc919a167a732f24cf4216664374087628e15Sumir Kataria/**
201bffc919a167a732f24cf4216664374087628e15Sumir Kataria * An enum that determines what to do with existing {@link PeriodicWorkRequest}s with the same
211bffc919a167a732f24cf4216664374087628e15Sumir Kataria * unique name in case of a collision.
221bffc919a167a732f24cf4216664374087628e15Sumir Kataria */
231bffc919a167a732f24cf4216664374087628e15Sumir Katariapublic enum ExistingPeriodicWorkPolicy {
241bffc919a167a732f24cf4216664374087628e15Sumir Kataria
251bffc919a167a732f24cf4216664374087628e15Sumir Kataria    /**
261bffc919a167a732f24cf4216664374087628e15Sumir Kataria     * If there is existing pending work with the same unique name, cancel and delete it.  Then,
271bffc919a167a732f24cf4216664374087628e15Sumir Kataria     * insert the newly-specified work.
281bffc919a167a732f24cf4216664374087628e15Sumir Kataria     */
291bffc919a167a732f24cf4216664374087628e15Sumir Kataria    REPLACE,
301bffc919a167a732f24cf4216664374087628e15Sumir Kataria
311bffc919a167a732f24cf4216664374087628e15Sumir Kataria    /**
321bffc919a167a732f24cf4216664374087628e15Sumir Kataria     * If there is existing pending work with the same unique name, do nothing.  Otherwise, insert
331bffc919a167a732f24cf4216664374087628e15Sumir Kataria     * the newly-specified work.
341bffc919a167a732f24cf4216664374087628e15Sumir Kataria     */
351bffc919a167a732f24cf4216664374087628e15Sumir Kataria    KEEP
361bffc919a167a732f24cf4216664374087628e15Sumir Kataria}
37