Implementing checkStyleViolationSeverity=error for mdsal-eos-binding-api module
[mdsal.git] / entityownership / mdsal-eos-binding-api / src / main / java / org / opendaylight / mdsal / eos / binding / api / EntityOwnershipService.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.binding.api;
9
10 import com.google.common.annotations.Beta;
11 import com.google.common.base.Optional;
12 import javax.annotation.Nonnull;
13 import org.opendaylight.mdsal.eos.common.api.CandidateAlreadyRegisteredException;
14 import org.opendaylight.mdsal.eos.common.api.EntityOwnershipState;
15 import org.opendaylight.mdsal.eos.common.api.GenericEntityOwnershipService;
16 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
17
18 /**
19  * Binding version of {@link GenericEntityOwnershipService}.
20  *
21  * @author Thomas Pantelis
22  */
23 @Beta
24 public interface EntityOwnershipService extends
25         GenericEntityOwnershipService<InstanceIdentifier<?>, Entity, EntityOwnershipListener> {
26
27     @Override
28     EntityOwnershipCandidateRegistration registerCandidate(@Nonnull Entity entity)
29             throws CandidateAlreadyRegisteredException;
30
31     @Override
32     EntityOwnershipListenerRegistration registerListener(@Nonnull String entityType,
33             @Nonnull EntityOwnershipListener listener);
34
35     @Override
36     Optional<EntityOwnershipState> getOwnershipState(@Nonnull Entity forEntity);
37
38     @Override
39     boolean isCandidateRegistered(@Nonnull Entity forEntity);
40 }