blob: 793653cdea513e470ad15e74cd3b481c9a221268 [file] [log] [blame]
Brian O'Connor86f6f7f2014-12-01 17:02:45 -08001/*
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'Connor86f6f7f2014-12-01 17:02:45 -080017
Brian O'Connorabafb502014-12-02 22:26:20 -080018import org.onosproject.core.ApplicationId;
19import org.onosproject.event.AbstractEvent;
Brian O'Connor86f6f7f2014-12-01 17:02:45 -080020
21/**
22 * A class to represent an intent related event.
23 */
Brian O'Connorea4d7d12015-01-28 16:37:46 -080024@Deprecated
Brian O'Connor86f6f7f2014-12-01 17:02:45 -080025public class IntentBatchLeaderEvent extends AbstractEvent<IntentBatchLeaderEvent.Type, ApplicationId> {
26
27 public enum Type {
28 /**
29 * Signifies that this instance has become the leader for the given application id.
30 */
31 ELECTED,
32
33 /**
34 * Signifies that instance is no longer the leader for a given application id.
35 */
36 BOOTED
37 }
38
39 /**
40 * Creates an event of a given type and for the specified appId and the
41 * current time.
42 *
43 * @param type event type
44 * @param appId subject appId
45 * @param time time the event created in milliseconds since start of epoch
46 */
47 public IntentBatchLeaderEvent(Type type, ApplicationId appId, long time) {
48 super(type, appId, time);
49 }
50
51 /**
52 * Creates an event of a given type and for the specified appId and the
53 * current time.
54 *
55 * @param type event type
56 * @param appId subject appId
57 */
58 public IntentBatchLeaderEvent(Type type, ApplicationId appId) {
59 super(type, appId);
60 }
61
62}