update deprecated transform and addCallback methods
[groupbasedpolicy.git] / sxp-integration / sxp-ep-provider / src / main / java / org / opendaylight / groupbasedpolicy / sxp / ep / provider / impl / EPToSgtMapperImpl.java
index 3ec8e5ecf26fad86bf51aea625b81a9196a325ea..c1134a8e0360104cf7a6f4176d2114f7d2292f10 100644 (file)
@@ -11,6 +11,8 @@ package org.opendaylight.groupbasedpolicy.sxp.ep.provider.impl;
 import com.google.common.base.Function;
 import com.google.common.util.concurrent.Futures;
 import com.google.common.util.concurrent.ListenableFuture;
+import com.google.common.util.concurrent.MoreExecutors;
+
 import java.util.Collection;
 import java.util.HashSet;
 import javax.annotation.Nullable;
@@ -55,6 +57,7 @@ public class EPToSgtMapperImpl implements EPToSgtMapper {
     public ListenableFuture<Collection<Sgt>> findSgtForEP(final AddressEndpointWithLocation endpointWithLocation) {
         final EpPolicyTemplateValueKey rawKey = new EpPolicyTemplateValueKey(endpointWithLocation);
         final EpPolicyTemplateValueKey key = keyFactory.sortValueKeyLists(rawKey);
-        return Futures.transform(epPolicyTemplateReader.readBy(key), TRANSFORM_TEMPLATE_TO_SGT);
+        return Futures.transform(epPolicyTemplateReader.readBy(key), TRANSFORM_TEMPLATE_TO_SGT,
+            MoreExecutors.directExecutor());
     }
 }