Bug 4105: Added DistributedEntityOwnershipService and wiring
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / entityownership / DistributedEntityOwnershipService.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.controller.cluster.datastore.entityownership;
9
10 import org.opendaylight.controller.cluster.datastore.DistributedDataStore;
11 import org.opendaylight.controller.md.sal.common.api.clustering.CandidateAlreadyRegisteredException;
12 import org.opendaylight.controller.md.sal.common.api.clustering.Entity;
13 import org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipCandidate;
14 import org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipCandidateRegistration;
15 import org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipListener;
16 import org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipListenerRegistration;
17 import org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipService;
18 import org.slf4j.Logger;
19 import org.slf4j.LoggerFactory;
20
21 /**
22  * The distributed implementation of the EntityOwnershipService.
23  *
24  * @author Thomas Pantelis
25  */
26 public class DistributedEntityOwnershipService implements EntityOwnershipService, AutoCloseable {
27     private static final Logger LOG = LoggerFactory.getLogger(DistributedEntityOwnershipService.class);
28
29     private final DistributedDataStore datastore;
30
31     public DistributedEntityOwnershipService(DistributedDataStore datastore) {
32         this.datastore = datastore;
33     }
34
35     public void start() {
36         LOG.info("DistributedEntityOwnershipService starting");
37     }
38
39     @Override
40     public EntityOwnershipCandidateRegistration registerCandidate(Entity entity, EntityOwnershipCandidate candidate)
41             throws CandidateAlreadyRegisteredException {
42         // TODO Auto-generated method stub
43         return null;
44     }
45
46     @Override
47     public EntityOwnershipListenerRegistration registerListener(Entity entity, EntityOwnershipListener listener) {
48         // TODO Auto-generated method stub
49         return null;
50     }
51
52     @Override
53     public void close() {
54     }
55 }