blob: 1401833bf443810d20ddd139a5092a7514834e3a [file] [log] [blame]
Brian O'Connorfa81eae2014-10-30 13:20:05 -07001/*
2 * Copyright 2014 Open Networking Laboratory
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 */
Brian O'Connorabafb502014-12-02 22:26:20 -080016package org.onosproject.net.intent;
Brian O'Connorfa81eae2014-10-30 13:20:05 -070017
Brian O'Connorabafb502014-12-02 22:26:20 -080018import org.onosproject.core.ApplicationId;
Brian O'Connor72a034c2014-11-26 18:24:23 -080019
Brian O'Connorfa81eae2014-10-30 13:20:05 -070020/**
21 * Service for tracking and delegating batches of intent operations.
22 */
Brian O'Connorea4d7d12015-01-28 16:37:46 -080023@Deprecated
Brian O'Connorfa81eae2014-10-30 13:20:05 -070024public interface IntentBatchService {
25
26 /**
Brian O'Connor72a034c2014-11-26 18:24:23 -080027 * Return true if this instance is the local leader for batch
28 * processing a given application id.
29 *
alshabiba9819bf2014-11-30 18:15:52 -080030 * @param applicationId an application id
31 * @return true if this instance is the local leader for batch
Brian O'Connor72a034c2014-11-26 18:24:23 -080032 */
33 boolean isLocalLeader(ApplicationId applicationId);
34
35 /**
Brian O'Connorfa81eae2014-10-30 13:20:05 -070036 * Sets the batch service delegate.
37 *
38 * @param delegate delegate to apply
39 */
40 void setDelegate(IntentBatchDelegate delegate);
41
42 /**
43 * Unsets the batch service delegate.
44 *
45 * @param delegate delegate to unset
46 */
47 void unsetDelegate(IntentBatchDelegate delegate);
48
Brian O'Connor86f6f7f2014-12-01 17:02:45 -080049 /**
50 * Adds the specified listener for intent batch leadership events.
51 *
52 * @param listener listener to be added
53 */
54 void addListener(IntentBatchListener listener);
55
56 /**
57 * Removes the specified listener for intent batch leadership events.
58 *
59 * @param listener listener to be removed
60 */
61 void removeListener(IntentBatchListener listener);
Brian O'Connorfa81eae2014-10-30 13:20:05 -070062}