X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2Fentityownership%2FDistributedEntityOwnershipListenerRegistration.java;h=149551b8c89bc912b569e669fade1a255422327e;hb=a6af137c30470b86d4bc624d4c48cb686495a182;hp=2e0f4b4f2d9b748e5e784736e52d28d264e7df8c;hpb=6b31b94c7c06711efd69f7fd456167026f34dc2e;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/DistributedEntityOwnershipListenerRegistration.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/DistributedEntityOwnershipListenerRegistration.java index 2e0f4b4f2d..149551b8c8 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/DistributedEntityOwnershipListenerRegistration.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/DistributedEntityOwnershipListenerRegistration.java @@ -7,6 +7,7 @@ */ package org.opendaylight.controller.cluster.datastore.entityownership; +import com.google.common.base.MoreObjects.ToStringHelper; import com.google.common.base.Preconditions; import org.opendaylight.mdsal.eos.dom.api.DOMEntityOwnershipListener; import org.opendaylight.mdsal.eos.dom.api.DOMEntityOwnershipListenerRegistration; @@ -22,8 +23,8 @@ class DistributedEntityOwnershipListenerRegistration extends AbstractObjectRegis private final DistributedEntityOwnershipService service; private final String entityType; - DistributedEntityOwnershipListenerRegistration(DOMEntityOwnershipListener listener, String entityType, - DistributedEntityOwnershipService service) { + DistributedEntityOwnershipListenerRegistration(final DOMEntityOwnershipListener listener, final String entityType, + final DistributedEntityOwnershipService service) { super(listener); this.entityType = Preconditions.checkNotNull(entityType, "entityType cannot be null"); this.service = Preconditions.checkNotNull(service, "DOMEntityOwnershipListener cannot be null"); @@ -40,8 +41,7 @@ class DistributedEntityOwnershipListenerRegistration extends AbstractObjectRegis } @Override - public String toString() { - return "DistributedEntityOwnershipListenerRegistration [entityType=" + getEntityType() - + ", listener=" + getInstance() + "]"; + protected ToStringHelper addToStringAttributes(final ToStringHelper toStringHelper) { + return toStringHelper.add("entityType", entityType); } }