blob: 0364ad7f5b8092724d5bc7d90afd42a0976b2431 [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 */
16package org.onlab.onos.net.intent;
17
18import java.util.Set;
19
20/**
21 * Service for tracking and delegating batches of intent operations.
22 */
23public interface IntentBatchService {
24
25 /**
26 * Submits a batch of intent operations.
27 *
28 * @param operations batch of operations
29 */
30 void addIntentOperations(IntentOperations operations);
31
32 /**
33 * Removes the specified batch of intent operations after completion.
34 *
35 * @param operations batch of operations
36 */
37 void removeIntentOperations(IntentOperations operations);
38
39 /**
Brian O'Connor427a1762014-11-19 18:40:32 -080040 * Returns the set of intent batches that are pending.
Brian O'Connorfa81eae2014-10-30 13:20:05 -070041 * @return set of batches
42 */
Brian O'Connor427a1762014-11-19 18:40:32 -080043 Set<IntentOperations> getPendingOperations();
44
45 /**
46 * Returns the set of intent batches currently being processed.
47 * @return set of batches
48 */
49 Set<IntentOperations> getCurrentOperations();
Brian O'Connorfa81eae2014-10-30 13:20:05 -070050
51 /**
52 * Sets the batch service delegate.
53 *
54 * @param delegate delegate to apply
55 */
56 void setDelegate(IntentBatchDelegate delegate);
57
58 /**
59 * Unsets the batch service delegate.
60 *
61 * @param delegate delegate to unset
62 */
63 void unsetDelegate(IntentBatchDelegate delegate);
64
65}