Eliminate EntityOwnershipChange
[mdsal.git] / entityownership / mdsal-eos-common-api / src / main / java / org / opendaylight / mdsal / eos / common / api / GenericEntityOwnershipListener.java
1 /*
2  * Copyright (c) 2015 Brocade Communications Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.mdsal.eos.common.api;
9
10 import org.eclipse.jdt.annotation.NonNull;
11
12 /**
13  * An interface for a class that listens for entity ownership changes.
14  *
15  * @param <E> the {@link GenericEntity} type
16  * @author Thomas Pantelis
17  */
18 public interface GenericEntityOwnershipListener<E extends GenericEntity<?>> {
19     /**
20      * A notification that is generated when the ownership status of an entity changes.
21      *
22      * @param entity the entity whose ownership status changed
23      * @param change the change the entity underwent
24      * @param inJeopardy {@code true} if ownership is in jeopardy and the reported change may be inaccurate
25      */
26     void ownershipChanged(@NonNull E entity, @NonNull EntityOwnershipStateChange change, boolean inJeopardy);
27 }