Brian O'Connor | 86f6f7f | 2014-12-01 17:02:45 -0800 | [diff] [blame] | 1 | /* |
| 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'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 16 | package org.onosproject.net.intent; |
Brian O'Connor | 86f6f7f | 2014-12-01 17:02:45 -0800 | [diff] [blame] | 17 | |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 18 | import org.onosproject.core.ApplicationId; |
| 19 | import org.onosproject.event.AbstractEvent; |
Brian O'Connor | 86f6f7f | 2014-12-01 17:02:45 -0800 | [diff] [blame] | 20 | |
| 21 | /** |
| 22 | * A class to represent an intent related event. |
| 23 | */ |
Brian O'Connor | ea4d7d1 | 2015-01-28 16:37:46 -0800 | [diff] [blame] | 24 | @Deprecated |
Brian O'Connor | 86f6f7f | 2014-12-01 17:02:45 -0800 | [diff] [blame] | 25 | public 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 | } |