Merge "SONAR TD - DeviceFlowRegistryImpl, FlowDescriptorFactory, FlowRegistryKeyFactory"
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / util / FlowUtil.java
index 931532e41e5e7c404619ff8aa5a12e095194524f..2aad0ecc568cb8d21d3a723d4da58d424eb32b11 100644 (file)
@@ -16,7 +16,6 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
-import java.util.concurrent.atomic.AtomicInteger;
 import javax.annotation.Nullable;
 import org.apache.commons.lang3.tuple.Pair;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
@@ -45,13 +44,7 @@ import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/**
- * Created by Martin Bobak <mbobak@cisco.com> on 8.4.2015.
- */
 public final class FlowUtil {
-
-    private static final String ALIEN_SYSTEM_FLOW_ID = "#UF$TABLE*";
-    private static final AtomicInteger unaccountedFlowsCounter = new AtomicInteger(0);
     private static final Logger LOG = LoggerFactory.getLogger(FlowUtil.class);
     private static final RpcResultBuilder<List<BatchFailedFlowsOutput>> SUCCESSFUL_FLOW_OUTPUT_RPC_RESULT =
             RpcResultBuilder.success(Collections.<BatchFailedFlowsOutput>emptyList());
@@ -151,20 +144,6 @@ public final class FlowUtil {
         return resultBld;
     }
 
-    /**
-     * Create alien flow id
-     *
-     * @param tableId the table id
-     * @return the flow id
-     */
-    public static FlowId createAlienFlowId(final short tableId) {
-        final StringBuilder sBuilder = new StringBuilder(ALIEN_SYSTEM_FLOW_ID)
-                .append(tableId).append('-').append(unaccountedFlowsCounter.incrementAndGet());
-        String alienId = sBuilder.toString();
-        return new FlowId(alienId);
-
-    }
-
     /**
      * Factory method: create {@link Function} which attaches barrier response to given {@link RpcResult}&lt;T&gt;
      * and changes success flag if needed.