Madan Jampani | ad3c526 | 2016-01-20 00:50:17 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015-2016 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.net.provider.ProviderService; |
| 19 | import org.onosproject.store.service.Versioned; |
| 20 | |
| 21 | /** |
| 22 | * Service through which a {@link ClusterMetadataProvider provider} can notify core of |
| 23 | * updates made to cluster metadata. |
| 24 | */ |
| 25 | public interface ClusterMetadataProviderService extends ProviderService<ClusterMetadataProvider> { |
| 26 | |
| 27 | /** |
| 28 | * Notifies about a change to cluster metadata. |
| 29 | * @param newMetadata new cluster metadata value |
| 30 | */ |
| 31 | void clusterMetadataChanged(Versioned<ClusterMetadata> newMetadata); |
| 32 | |
| 33 | /** |
| 34 | * Notifies that a node just become the active member of a partition. |
| 35 | * @param partitionId partition identifier |
| 36 | * @param nodeId identifier of node |
| 37 | */ |
| 38 | void newActiveMemberForPartition(PartitionId partitionId, NodeId nodeId); |
| 39 | } |