Hide ActionableResourceImpl 14/85414/14
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 28 Oct 2019 16:50:49 +0000 (17:50 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 24 Jul 2020 11:31:27 +0000 (13:31 +0200)
With all users migrated to ActionableResources, we can safely hide
this implementation class and remove the now-unused setters, making
things neatly final and predictable.

JIRA: GENIUS-281
Change-Id: I00caad5574526369b62d50f018d1c95423f370ff
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/utils/batching/ActionableResourceImpl.java

index 3550ae606d12f0317b8b13fa43f88303059b275f..9bb7cbe26b5b81fdcc1723e00832c4e86b64ffb4 100644 (file)
@@ -14,19 +14,14 @@ import com.google.common.util.concurrent.SettableFuture;
 import org.opendaylight.yangtools.concepts.Identifier;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
-public class ActionableResourceImpl implements ActionableResource {
-    private Object instance;
-    private Object oldInstance;
-    private Object key;
-    private InstanceIdentifier identifier;
-    private short action;
+class ActionableResourceImpl implements ActionableResource {
+    private final Object instance;
+    private final Object oldInstance;
+    private final Object key;
+    private final InstanceIdentifier identifier;
+    private final short action;
     private final SettableFuture future = SettableFuture.create();
 
-    @Deprecated
-    public ActionableResourceImpl(String key) {
-        this.key = requireNonNull(key);
-    }
-
     ActionableResourceImpl(InstanceIdentifier identifier, short action, Object updatedData, Object oldData) {
         this.key = null;
         this.action = action;
@@ -44,56 +39,26 @@ public class ActionableResourceImpl implements ActionableResource {
         this.oldInstance = oldData;
     }
 
-    @Deprecated
-    public ActionableResourceImpl(String key, InstanceIdentifier identifier, short action, Object updatedData,
-            Object oldData) {
-        this.instance = updatedData;
-        this.oldInstance = oldData;
-        this.key = key;
-        this.identifier = identifier;
-        this.action = action;
-    }
-
-    public void setInstance(Object instance) {
-        this.instance = instance;
-    }
-
     @Override
     public Object getInstance() {
         return this.instance;
     }
 
-    public void setOldInstance(Object oldInstance) {
-        this.oldInstance = oldInstance;
-    }
-
     @Override
     public Object getOldInstance() {
         return this.oldInstance;
     }
 
-    public void setInstanceIdentifier(InstanceIdentifier instanceIdentifier) {
-        this.identifier = instanceIdentifier;
-    }
-
     @Override
     public InstanceIdentifier getInstanceIdentifier() {
         return this.identifier;
     }
 
-    public void setAction(short action) {
-        this.action = action;
-    }
-
     @Override
     public short getAction() {
         return action;
     }
 
-    public void setKey(String key) {
-        this.key = key;
-    }
-
     @Override
     public ListenableFuture<Void> getResultFuture() {
         return future;