Adjust to yangtools-2.0.0 changes
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / entityownership / DistributedEntityOwnershipListenerRegistration.java
index 2e0f4b4f2d9b748e5e784736e52d28d264e7df8c..149551b8c89bc912b569e669fade1a255422327e 100644 (file)
@@ -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);
     }
 }