X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-eos%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fentityownership%2FDistributedEntityOwnershipListenerRegistration.java;fp=opendaylight%2Fmd-sal%2Fsal-distributed-eos%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fentityownership%2FDistributedEntityOwnershipListenerRegistration.java;h=0000000000000000000000000000000000000000;hb=118c8b39d7bece6c3dc4adb8e27401a325b69692;hp=bb4e31c7c83121efb17312ea77a80df4abe54d85;hpb=d8deaa4381251e0900a6ba50d1f16bab47ab8491;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-eos/src/main/java/org/opendaylight/controller/cluster/entityownership/DistributedEntityOwnershipListenerRegistration.java b/opendaylight/md-sal/sal-distributed-eos/src/main/java/org/opendaylight/controller/cluster/entityownership/DistributedEntityOwnershipListenerRegistration.java deleted file mode 100644 index bb4e31c7c8..0000000000 --- a/opendaylight/md-sal/sal-distributed-eos/src/main/java/org/opendaylight/controller/cluster/entityownership/DistributedEntityOwnershipListenerRegistration.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package org.opendaylight.controller.cluster.entityownership; - -import static java.util.Objects.requireNonNull; - -import com.google.common.base.MoreObjects.ToStringHelper; -import org.opendaylight.mdsal.eos.dom.api.DOMEntityOwnershipListener; -import org.opendaylight.mdsal.eos.dom.api.DOMEntityOwnershipListenerRegistration; -import org.opendaylight.yangtools.concepts.AbstractObjectRegistration; - -/** - * Implementation of EntityOwnershipListenerRegistration. - * - * @author Thomas Pantelis - */ -class DistributedEntityOwnershipListenerRegistration extends AbstractObjectRegistration - implements DOMEntityOwnershipListenerRegistration { - private final DistributedEntityOwnershipService service; - private final String entityType; - - DistributedEntityOwnershipListenerRegistration(final DOMEntityOwnershipListener listener, final String entityType, - final DistributedEntityOwnershipService service) { - super(listener); - this.entityType = requireNonNull(entityType, "entityType cannot be null"); - this.service = requireNonNull(service, "DOMEntityOwnershipListener cannot be null"); - } - - @Override - protected void removeRegistration() { - service.unregisterListener(getEntityType(), getInstance()); - } - - @Override - public String getEntityType() { - return entityType; - } - - @Override - protected ToStringHelper addToStringAttributes(final ToStringHelper toStringHelper) { - return toStringHelper.add("entityType", entityType); - } -}