Madan Jampani | ec1df02 | 2015-10-13 21:23:03 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 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 | */ |
| 16 | package org.onosproject.cluster; |
| 17 | |
| 18 | import org.onosproject.event.AbstractEvent; |
| 19 | |
| 20 | /** |
| 21 | * Describes a cluster metadata event. |
| 22 | */ |
| 23 | public class ClusterMetadataEvent extends AbstractEvent<ClusterMetadataEvent.Type, ClusterMetadata> { |
| 24 | |
| 25 | /** |
| 26 | * Type of cluster metadata events. |
| 27 | */ |
| 28 | public enum Type { |
| 29 | /** |
| 30 | * Signifies that the cluster metadata has changed. |
| 31 | */ |
| 32 | METADATA_CHANGED, |
| 33 | } |
| 34 | |
| 35 | /** |
| 36 | * Creates an event of a given type and for the specified metadata and the |
| 37 | * current time. |
| 38 | * |
| 39 | * @param type cluster metadata event type |
| 40 | * @param metadata cluster metadata subject |
| 41 | */ |
| 42 | public ClusterMetadataEvent(Type type, ClusterMetadata metadata) { |
| 43 | super(type, metadata); |
| 44 | } |
| 45 | |
| 46 | /** |
| 47 | * Creates an event of a given type and for the specified metadata and time. |
| 48 | * |
| 49 | * @param type cluster metadata event type |
| 50 | * @param metadata cluster metadata subject |
| 51 | * @param time occurrence time |
| 52 | */ |
| 53 | public ClusterMetadataEvent(Type type, ClusterMetadata metadata, long time) { |
| 54 | super(type, metadata, time); |
| 55 | } |
| 56 | } |