blob: 665030e763d98fad7af72cb3ecb963a73f08456b [file] [log] [blame]
Madan Jampaniec1df022015-10-13 21:23:03 -07001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
Madan Jampaniec1df022015-10-13 21:23:03 -07003 *
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.onosproject.cluster;
17
18import org.onosproject.event.AbstractEvent;
19
20/**
21 * Describes a cluster metadata event.
22 */
23public 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}