<artifactId>javax.annotation-api</artifactId>
<optional>true</optional>
</dependency>
+ <dependency>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ <optional>true</optional>
+ </dependency>
<dependency>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>mdsal-binding-api</artifactId>
<artifactId>infrautils-util</artifactId>
<version>${infrautils.version}</version>
</dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>mdsal-binding-dom-adapter</artifactId>
<artifactId>javax.annotation-api</artifactId>
<optional>true</optional>
</dependency>
+ <dependency>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ <optional>true</optional>
+ </dependency>
<dependency>
<groupId>org.opendaylight.mdsal</groupId>
import com.google.common.util.concurrent.MoreExecutors;
import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
-import javax.annotation.Nullable;
import org.opendaylight.openflowplugin.applications.frsync.SemaphoreKeeper;
import org.opendaylight.openflowplugin.applications.frsync.SyncReactor;
import org.opendaylight.openflowplugin.applications.frsync.util.PathUtil;
final NodeId nodeId) {
return new FutureCallback<Boolean>() {
@Override
- public void onSuccess(@Nullable final Boolean result) {
+ public void onSuccess(final Boolean result) {
if (LOG.isDebugEnabled()) {
final long stampFinished = System.nanoTime();
LOG.debug("Syncup finished {} took:{} rpc:{} wait:{}", nodeId.getValue(),
import java.util.List;
import java.util.Map;
import java.util.concurrent.Future;
-import javax.annotation.Nonnull;
import org.opendaylight.openflowplugin.applications.frsync.SyncPlanPushStrategy;
import org.opendaylight.openflowplugin.applications.frsync.util.ItemSyncBox;
import org.opendaylight.openflowplugin.applications.frsync.util.PathUtil;
final SyncCrudCounters counters) {
return new FutureCallback<RpcResult<ProcessFlatBatchOutput>>() {
@Override
- public void onSuccess(@Nonnull final RpcResult<ProcessFlatBatchOutput> result) {
+ public void onSuccess(final RpcResult<ProcessFlatBatchOutput> result) {
if (!result.isSuccessful() && result.getResult() != null
&& !result.getResult().getBatchFailure().isEmpty()) {
Map<Range<Integer>, Batch> batchMap = mapBatchesToRanges(inputBatchBag, failureIndexLimit);
import com.google.common.collect.ImmutableList;
import com.google.common.util.concurrent.FutureCallback;
import java.util.Collection;
-import javax.annotation.Nullable;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
import org.opendaylight.yangtools.yang.common.RpcError;
import org.opendaylight.yangtools.yang.common.RpcResult;
public static FutureCallback<RpcResult<Void>> logResultCallback(final NodeId nodeId, final String prefix) {
return new FutureCallback<RpcResult<Void>>() {
@Override
- public void onSuccess(@Nullable final RpcResult<Void> result) {
+ public void onSuccess(final RpcResult<Void> result) {
if (result != null) {
if (result.isSuccessful()) {
LOG.debug("{} finished successfully: {}", prefix, nodeId.getValue());
<artifactId>javax.annotation-api</artifactId>
<optional>true</optional>
</dependency>
+ <dependency>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ <optional>true</optional>
+ </dependency>
<dependency>
<groupId>org.opendaylight.openflowplugin</groupId>
<artifactId>openflowplugin-api</artifactId>
<artifactId>infrautils-util</artifactId>
<version>${infrautils.version}</version>
</dependency>
-
- <!-- Test dependencies -->
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
</dependencies>
</project>
import com.google.common.base.Preconditions;
import java.util.Collection;
import java.util.concurrent.Future;
-import javax.annotation.Nonnull;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.inject.Inject;
}
@Override
- public void onDataTreeChanged(@Nonnull final Collection<DataTreeModification<FlowCapableNode>> modifications) {
+ public void onDataTreeChanged(final Collection<DataTreeModification<FlowCapableNode>> modifications) {
for (DataTreeModification<FlowCapableNode> modification : modifications) {
if (modification.getRootNode().getModificationType() == ModificationType.WRITE) {
String nodeId = modification.getRootPath().getRootIdentifier()
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
</dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </dependency>
<dependency>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>mdsal-binding-api</artifactId>
<groupId>org.opendaylight.openflowplugin.model</groupId>
<artifactId>model-flow-service</artifactId>
</dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>mdsal-binding-dom-adapter</artifactId>
<artifactId>blueprint-maven-plugin-annotation</artifactId>
<optional>true</optional>
</dependency>
+ <dependency>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ <optional>true</optional>
+ </dependency>
</dependencies>
<build>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
</dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </dependency>
<dependency>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>mdsal-binding-api</artifactId>
<groupId>org.opendaylight.openflowplugin.model</groupId>
<artifactId>model-flow-service</artifactId>
</dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>mdsal-binding-dom-adapter</artifactId>
<artifactId>javax.annotation-api</artifactId>
<optional>true</optional>
</dependency>
+ <dependency>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ <optional>true</optional>
+ </dependency>
</dependencies>
</project>
import java.util.Collection;
import java.util.List;
import java.util.concurrent.Future;
-import javax.annotation.Nonnull;
import org.opendaylight.infrautils.utils.concurrent.JdkFutures;
import org.opendaylight.mdsal.binding.api.ClusteredDataTreeChangeListener;
import org.opendaylight.mdsal.binding.api.DataBroker;
}
@Override
- public void onDataTreeChanged(@Nonnull final Collection<DataTreeModification<FlowCapableNode>> modifications) {
+ public void onDataTreeChanged(final Collection<DataTreeModification<FlowCapableNode>> modifications) {
for (DataTreeModification<FlowCapableNode> modification : modifications) {
if (modification.getRootNode().getModificationType() == ModificationType.WRITE) {
String nodeId = modification.getRootPath().getRootIdentifier()
<groupId>org.opendaylight.controller.model</groupId>
<artifactId>model-inventory</artifactId>
</dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<artifactId>blueprint-maven-plugin-annotation</artifactId>
<optional>true</optional>
</dependency>
+ <dependency>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ <optional>true</optional>
+ </dependency>
</dependencies>
import com.google.common.util.concurrent.ListenableFuture;
import java.util.Optional;
import java.util.concurrent.ExecutionException;
-import javax.annotation.Nonnull;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.inject.Inject;
return Futures.immediateFuture(null);
}
- @Nonnull
@Override
public ServiceGroupIdentifier getIdentifier() {
return ServiceGroupIdentifier.create(TOPOLOGY_PROVIDER);
package org.opendaylight.openflowplugin.applications.topology.manager;
import java.util.Collection;
-import javax.annotation.Nonnull;
import javax.annotation.PreDestroy;
import javax.inject.Inject;
import javax.inject.Singleton;
}
@Override
- public void onDataTreeChanged(@Nonnull final Collection<DataTreeModification<FlowCapableNode>> modifications) {
+ public void onDataTreeChanged(final Collection<DataTreeModification<FlowCapableNode>> modifications) {
for (DataTreeModification modification : modifications) {
switch (modification.getRootNode().getModificationType()) {
case WRITE:
return topologyNodeBuilder.build();
}
-}
\ No newline at end of file
+}
import java.util.Collection;
import java.util.Optional;
import java.util.concurrent.ExecutionException;
-import javax.annotation.Nonnull;
import javax.annotation.PreDestroy;
import javax.inject.Inject;
import javax.inject.Singleton;
}
@Override
- public void onDataTreeChanged(@Nonnull Collection<DataTreeModification<FlowCapableNodeConnector>> modifications) {
+ public void onDataTreeChanged(Collection<DataTreeModification<FlowCapableNodeConnector>> modifications) {
for (DataTreeModification<FlowCapableNodeConnector> modification : modifications) {
switch (modification.getRootNode().getModificationType()) {
case WRITE:
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>4.0.9</version>
+ <version>5.0.0</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>karaf4-parent</artifactId>
- <version>4.0.9</version>
+ <version>5.0.0</version>
</parent>
<groupId>org.opendaylight.openflowplugin</groupId>
<artifactId>openflowplugin-karaf</artifactId>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>feature-repo-parent</artifactId>
- <version>4.0.9</version>
+ <version>5.0.0</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>4.0.9</version>
+ <version>5.0.0</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>4.0.9</version>
+ <version>5.0.0</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>4.0.9</version>
+ <version>5.0.0</version>
<relativePath/>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>javax.annotation-api</artifactId>
<optional>true</optional>
</dependency>
+ <dependency>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ <optional>true</optional>
+ </dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>openflowplugin-extension-api</artifactId>
<artifactId>openflow-protocol-api</artifactId>
</dependency>
<!-- Test dependencies -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>feature-repo-parent</artifactId>
- <version>4.0.9</version>
+ <version>5.0.0</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>4.0.9</version>
+ <version>5.0.0</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>4.0.9</version>
+ <version>5.0.0</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>4.0.9</version>
+ <version>5.0.0</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>4.0.9</version>
+ <version>5.0.0</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>4.0.9</version>
+ <version>5.0.0</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>4.0.9</version>
+ <version>5.0.0</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>4.0.9</version>
+ <version>5.0.0</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>4.0.9</version>
+ <version>5.0.0</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>4.0.9</version>
+ <version>5.0.0</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>4.0.9</version>
+ <version>5.0.0</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>4.0.9</version>
+ <version>5.0.0</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>4.0.9</version>
+ <version>5.0.0</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>4.0.9</version>
+ <version>5.0.0</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>4.0.9</version>
+ <version>5.0.0</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>4.0.9</version>
+ <version>5.0.0</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>4.0.9</version>
+ <version>5.0.0</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>4.0.9</version>
+ <version>5.0.0</version>
<relativePath/>
</parent>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="odl-openflowplugin-libraries">
<feature name="odl-openflowplugin-libraries">
- <feature version="[4,5)">odl-guava</feature>
+ <feature version="[5,6)">odl-guava</feature>
</feature>
</features>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>4.0.9</version>
+ <version>5.0.0</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>4.0.9</version>
+ <version>5.0.0</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>4.0.9</version>
+ <version>5.0.0</version>
<relativePath/>
</parent>
<artifactId>javax.annotation-api</artifactId>
<optional>true</optional>
</dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ <optional>true</optional>
+ </dependency>
</dependencies>
<build>
<configuration>
<instructions>
<Export-Package>
- org.opendaylight.openflowplugin.libraries.liblldp</Export-Package>
+ org.opendaylight.openflowplugin.libraries.liblldp
+ </Export-Package>
</instructions>
</configuration>
</plugin>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>feature-repo-parent</artifactId>
- <version>4.0.9</version>
+ <version>5.0.0</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>4.0.9</version>
+ <version>5.0.0</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>4.0.9</version>
+ <version>5.0.0</version>
<relativePath/>
</parent>
<groupId>io.netty</groupId>
<artifactId>netty-buffer</artifactId>
</dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- </dependency>
<dependency>
<groupId>org.opendaylight.infrautils</groupId>
<artifactId>diagstatus-api</artifactId>
<version>${infrautils.version}</version>
<scope>compile</scope>
</dependency>
+ <dependency>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ <optional>true</optional>
+ </dependency>
</dependencies>
</project>
<scm>
<url>https://wiki.opendaylight.org/view/Openflow_Protocol_Library:Main</url>
<tag>HEAD</tag>
- </scm>
+ </scm>
<build>
<plugins>
<plugin>
<groupId>org.apache.aries.blueprint</groupId>
<artifactId>blueprint-maven-plugin</artifactId>
+ <configuration>
+ <scanPaths>
+ <!-- This is code migrated from openflowjava project and the java package
+ does not match artifact groupId, we therefore need to override it.
+ -->
+ <scanPath>org.opendaylight.openflowjava</scanPath>
+ </scanPaths>
+ </configuration>
+
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>diagstatus-api</artifactId>
<version>${infrautils.version}</version>
</dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- </dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<!-- Explicitly bring in the linux classifier, test may fail on 32-bit linux -->
<classifier>linux-x86_64</classifier>
</dependency>
+ <dependency>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ <optional>true</optional>
+ </dependency>
</dependencies>
</project>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>mdsal-eos-binding-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ <optional>true</optional>
+ </dependency>
</dependencies>
</project>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
<dependency>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>mdsal-binding-api</artifactId>
</dependency>
-
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ <optional>true</optional>
</dependency>
+
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<optional>true</optional>
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ <optional>true</optional>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
+ <artifactId>osgi.cmpn</artifactId>
</dependency>
<dependency>
<groupId>org.opendaylight.openflowplugin</groupId>
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.stream.Collectors;
-import javax.annotation.Nonnull;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.inject.Inject;
return switchConnectionProvider.startup();
}).collect(Collectors.toSet())), new FutureCallback<List<Boolean>>() {
@Override
- public void onSuccess(@Nonnull final List<Boolean> result) {
+ public void onSuccess(final List<Boolean> result) {
LOG.info("All switchConnectionProviders are up and running ({}).", result.size());
openflowDiagStatusProvider.reportStatus(OPENFLOW_SERVICE_NAME, ServiceState.OPERATIONAL);
fullyStarted.set(null);
}
@Override
- public void onFailure(@Nonnull final Throwable throwable) {
+ public void onFailure(final Throwable throwable) {
LOG.warn("Some switchConnectionProviders failed to start.", throwable);
openflowDiagStatusProvider.reportStatus(OPENFLOW_SERVICE_NAME, throwable);
fullyStarted.setException(throwable);
Futures.addCallback(listListenableFuture, new FutureCallback<List<Boolean>>() {
@Override
- public void onSuccess(@Nonnull final List<Boolean> result) {
+ public void onSuccess(final List<Boolean> result) {
LOG.info("All switchConnectionProviders were successfully shut down ({}).", result.size());
}
@Override
- public void onFailure(@Nonnull final Throwable throwable) {
+ public void onFailure(final Throwable throwable) {
LOG.warn("Some switchConnectionProviders failed to shutdown.", throwable);
}
}, MoreExecutors.directExecutor());
import java.util.List;
import java.util.Objects;
import java.util.concurrent.Future;
-import javax.annotation.Nonnull;
import org.opendaylight.openflowjava.protocol.api.connection.ConnectionAdapter;
import org.opendaylight.openflowplugin.api.OFConstants;
import org.opendaylight.openflowplugin.api.openflow.md.core.ErrorHandler;
= JdkFutureAdapters.listenInPoolThread(helloResult);
Futures.addCallback(rpcResultListenableFuture, new FutureCallback<RpcResult<HelloOutput>>() {
@Override
- public void onSuccess(@Nonnull RpcResult<HelloOutput> result) {
+ public void onSuccess(RpcResult<HelloOutput> result) {
if (result.isSuccessful()) {
LOG.debug("hello successfully sent, xid={}, addr={}", helloXid,
connectionAdapter.getRemoteAddress());
Futures.addCallback(JdkFutureAdapters.listenInPoolThread(featuresFuture),
new FutureCallback<RpcResult<GetFeaturesOutput>>() {
@Override
- public void onSuccess(@Nonnull RpcResult<GetFeaturesOutput> rpcFeatures) {
+ public void onSuccess(RpcResult<GetFeaturesOutput> rpcFeatures) {
LOG.trace("features are back");
if (rpcFeatures.isSuccessful()) {
GetFeaturesOutput featureOutput = rpcFeatures.getResult();
import com.google.common.util.concurrent.JdkFutureAdapters;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.MoreExecutors;
-import javax.annotation.Nullable;
import org.opendaylight.openflowplugin.api.openflow.connection.ConnectionContext;
import org.opendaylight.openflowplugin.api.openflow.connection.ConnectionStatus;
import org.opendaylight.openflowplugin.api.openflow.connection.HandshakeContext;
return new FutureCallback<RpcResult<BarrierOutput>>() {
@Override
@SuppressWarnings("checkstyle:IllegalCatch")
- public void onSuccess(@Nullable final RpcResult<BarrierOutput> result) {
+ public void onSuccess(final RpcResult<BarrierOutput> result) {
if (LOG.isDebugEnabled()) {
LOG.debug("succeeded by getting sweep barrier after post-handshake for device {}",
connectionContext.getDeviceInfo());
}
@Override
- public void onSuccess(@Nullable List<Optional<FlowCapableNode>> result) {
+ public void onSuccess(List<Optional<FlowCapableNode>> result) {
if (LOG.isDebugEnabled()) {
// Count all flows we read from datastore for debugging purposes.
// This number do not always represent how many flows were actually added
Futures.addCallback(future, new FutureCallback<Boolean>() {
@Override
- public void onSuccess(@Nullable final Boolean result) {
+ public void onSuccess(final Boolean result) {
if (Boolean.TRUE.equals(result)) {
LOG.debug("Creating empty flow capable node: {}", deviceInfo);
makeEmptyFlowCapableNode(deviceContext, deviceInfo);
}
@Override
- public void onFailure(@Nonnull final Throwable throwable) {
+ public void onFailure(final Throwable throwable) {
LOG.warn("Error occurred in preparation node {} for protocol 1.0", deviceInfo);
LOG.trace("Error for node {} : ", deviceInfo, throwable);
}
}, MoreExecutors.directExecutor());
return Futures.transform(future, new Function<Boolean, Void>() {
- @Nullable
@Override
- public Void apply(@Nullable final Boolean input) {
+ public Void apply(final Boolean input) {
LOG.debug("Writing physical port information for {}", deviceInfo);
writePhyPortInformation(deviceContext);
return null;
return Futures.transform(
switchFeaturesMandatory ? Futures.allAsList(futures) : Futures.successfulAsList(futures),
new Function<List<RpcResult<List<OfHeader>>>, Void>() {
- @Nullable
@Override
- public Void apply(@Nullable final List<RpcResult<List<OfHeader>>> input) {
+ public Void apply(final List<RpcResult<List<OfHeader>>> input) {
LOG.info("Static node {} successfully finished collecting",
deviceContext.getDeviceInfo());
return null;
@Nullable final ConvertorExecutor convertorExecutor) {
Futures.addCallback(future, new FutureCallback<RpcResult<List<OfHeader>>>() {
@Override
- public void onSuccess(@Nonnull final RpcResult<List<OfHeader>> result) {
+ public void onSuccess(final RpcResult<List<OfHeader>> result) {
if (result.getResult() != null) {
LOG.info("Static node {} info: {} collected", deviceContext.getDeviceInfo(), type);
translateAndWriteResult(
}
@Override
- public void onFailure(@Nonnull final Throwable throwable) {
+ public void onFailure(final Throwable throwable) {
LOG.warn("Request of type {} for static info of node {} failed.",
type, deviceContext.getDeviceInfo());
}
import java.util.concurrent.TimeoutException;
import java.util.stream.Collectors;
import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
import org.opendaylight.mdsal.eos.binding.api.EntityOwnershipChange;
import org.opendaylight.mdsal.eos.binding.api.EntityOwnershipListenerRegistration;
import org.opendaylight.mdsal.eos.binding.api.EntityOwnershipService;
ContextChain contextChain) {
return new FutureCallback<ResultState>() {
@Override
- public void onSuccess(@Nullable ResultState result) {
+ public void onSuccess(ResultState result) {
if (ResultState.DONOTHING == result) {
LOG.info("Device {} connection is enabled by reconciliation framework.", deviceInfo);
contextChain.continueInitializationAfterReconciliation();
}
@Override
- public void onFailure(@Nonnull Throwable throwable) {
+ public void onFailure(Throwable throwable) {
LOG.warn("Reconciliation framework failure.");
destroyContextChain(deviceInfo);
}
import com.google.common.util.concurrent.Service;
import java.util.function.Function;
import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
import org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier;
import org.opendaylight.openflowplugin.api.openflow.OFPContext;
import org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo;
Futures.addCallback(resultFuture, new FutureCallback<Object>() {
@Override
- public void onSuccess(@Nullable final Object result) {
+ public void onSuccess(final Object result) {
state = TERMINATED;
}
@Override
- public void onFailure(@Nonnull final Throwable throwable) {
+ public void onFailure(final Throwable throwable) {
state = TERMINATED;
}
}, MoreExecutors.directExecutor());
future.addCallback(new FutureCallback<Optional<FlowCapableNode>>() {
@Override
- public void onSuccess(@Nonnull Optional<FlowCapableNode> result) {
+ public void onSuccess(Optional<FlowCapableNode> result) {
result.map(Collections::singleton).orElse(Collections.emptySet()).stream()
.filter(Objects::nonNull)
.filter(flowCapableNode -> Objects.nonNull(flowCapableNode.getTable()))
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
import org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier;
import org.opendaylight.openflowplugin.api.OFConstants;
import org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo;
private final class MasterRoleCallback implements FutureCallback<RpcResult<SetRoleOutput>> {
@Override
- public void onSuccess(@Nullable RpcResult<SetRoleOutput> setRoleOutputRpcResult) {
+ public void onSuccess(RpcResult<SetRoleOutput> setRoleOutputRpcResult) {
contextChainMastershipWatcher.onMasterRoleAcquired(
deviceInfo,
ContextChainMastershipState.MASTER_ON_DEVICE);
}
@Override
- public void onFailure(@Nonnull final Throwable throwable) {
+ public void onFailure(final Throwable throwable) {
if (!(throwable instanceof CancellationException)) {
contextChainMastershipWatcher.onNotAbleToStartMastershipMandatory(
deviceInfo,
private final class SlaveRoleCallback implements FutureCallback<RpcResult<SetRoleOutput>> {
@Override
- public void onSuccess(@Nullable final RpcResult<SetRoleOutput> result) {
+ public void onSuccess(final RpcResult<SetRoleOutput> result) {
contextChainMastershipWatcher.onSlaveRoleAcquired(deviceInfo);
LOG.debug("Role SLAVE was successfully set on device, node {}", deviceInfo);
}
@Override
- public void onFailure(@Nonnull final Throwable throwable) {
+ public void onFailure(final Throwable throwable) {
if (!(throwable instanceof CancellationException)) {
contextChainMastershipWatcher.onSlaveRoleNotAcquired(deviceInfo,
"Was not able to propagate SLAVE role on device. Error: " + throwable.toString());
}
}
}
-}
\ No newline at end of file
+}
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.Semaphore;
import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
import org.opendaylight.mdsal.binding.api.NotificationPublishService;
import org.opendaylight.mdsal.binding.api.RpcProviderService;
import org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier;
@Override
public ListenableFuture<Void> closeServiceInstance() {
return Futures.transform(Futures.immediateFuture(null), new Function<Void, Void>() {
- @Nullable
@Override
- public Void apply(@Nullable final Void input) {
+ public Void apply(final Void input) {
unregisterRPCs();
return null;
}
import com.google.common.util.concurrent.FutureCallback;
import java.util.List;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
import org.opendaylight.openflowplugin.api.openflow.device.RequestContext;
import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack;
return new FutureCallback<OfHeader>() {
@Override
- public void onSuccess(@Nullable final OfHeader result) {
+ public void onSuccess(final OfHeader result) {
callback.onSuccess(result);
}
@Override
- public void onFailure(@Nonnull final Throwable throwable) {
+ public void onFailure(final Throwable throwable) {
// If we failed getting table features, at least create empty tables
if (MultipartType.OFPMPTABLEFEATURES.getClass().equals(requestType)) {
DeviceInitializationUtil.makeEmptyTables(
import java.util.Collection;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
-import javax.annotation.Nonnull;
import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack;
import org.opendaylight.openflowplugin.api.openflow.device.Xid;
handleServiceCall(roleRequestInputBuilder);
Futures.addCallback(genIdListenableFuture, new FutureCallback<RpcResult<RoleRequestOutput>>() {
@Override
- public void onSuccess(@Nonnull final RpcResult<RoleRequestOutput> roleRequestOutputRpcResult) {
+ public void onSuccess(final RpcResult<RoleRequestOutput> roleRequestOutputRpcResult) {
if (roleRequestOutputRpcResult.isSuccessful()) {
final RoleRequestOutput roleRequestOutput = roleRequestOutputRpcResult.getResult();
if (roleRequestOutput != null) {
final SettableFuture<RpcResult<SetRoleOutput>> finalFuture = SettableFuture.create();
Futures.addCallback(roleListenableFuture, new FutureCallback<RpcResult<RoleRequestOutput>>() {
@Override
- public void onSuccess(@Nonnull final RpcResult<RoleRequestOutput> roleRequestOutputRpcResult) {
+ public void onSuccess(final RpcResult<RoleRequestOutput> roleRequestOutputRpcResult) {
LOG.info("submitRoleChange onSuccess for device:{}, role:{}",
getDeviceInfo().getNodeId(), ofpRole);
final RoleRequestOutput roleRequestOutput = roleRequestOutputRpcResult.getResult();
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Future;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flat.batch.service.rev160321.ProcessFlatBatchOutput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flat.batch.service.rev160321.ProcessFlatBatchOutputBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flat.batch.service.rev160321.process.flat.batch.input.batch.batch.choice.flat.batch.add.flow._case.FlatBatchAddFlow;
static <T extends BatchFlowOutputListGrouping> Function<RpcResult<T>, RpcResult<ProcessFlatBatchOutput>>
convertBatchFlowResult(final int stepOffset) {
return new Function<RpcResult<T>, RpcResult<ProcessFlatBatchOutput>>() {
- @Nullable
@Override
- public RpcResult<ProcessFlatBatchOutput> apply(@Nonnull final RpcResult<T> input) {
+ public RpcResult<ProcessFlatBatchOutput> apply(final RpcResult<T> input) {
List<BatchFailure> batchFailures = wrapBatchFlowFailuresForFlat(input, stepOffset);
ProcessFlatBatchOutputBuilder outputBuilder =
new ProcessFlatBatchOutputBuilder().setBatchFailure(batchFailures);
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Future;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flat.batch.service.rev160321.ProcessFlatBatchOutput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flat.batch.service.rev160321.ProcessFlatBatchOutputBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flat.batch.service.rev160321.process.flat.batch.input.batch.batch.choice.flat.batch.add.group._case.FlatBatchAddGroup;
static <T extends BatchGroupOutputListGrouping> Function<RpcResult<T>, RpcResult<ProcessFlatBatchOutput>>
convertBatchGroupResult(final int stepOffset) {
return new Function<RpcResult<T>, RpcResult<ProcessFlatBatchOutput>>() {
- @Nullable
@Override
- public RpcResult<ProcessFlatBatchOutput> apply(@Nonnull final RpcResult<T> input) {
+ public RpcResult<ProcessFlatBatchOutput> apply(final RpcResult<T> input) {
List<BatchFailure> batchFailures = wrapBatchGroupFailuresForFlat(input, stepOffset);
ProcessFlatBatchOutputBuilder outputBuilder =
new ProcessFlatBatchOutputBuilder().setBatchFailure(batchFailures);
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Future;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flat.batch.service.rev160321.ProcessFlatBatchOutput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flat.batch.service.rev160321.ProcessFlatBatchOutputBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flat.batch.service.rev160321.process.flat.batch.input.batch.batch.choice.flat.batch.add.meter._case.FlatBatchAddMeter;
static <T extends BatchMeterOutputListGrouping> Function<RpcResult<T>, RpcResult<ProcessFlatBatchOutput>>
convertBatchMeterResult(final int stepOffset) {
return new Function<RpcResult<T>, RpcResult<ProcessFlatBatchOutput>>() {
- @Nullable
@Override
- public RpcResult<ProcessFlatBatchOutput> apply(@Nonnull final RpcResult<T> input) {
+ public RpcResult<ProcessFlatBatchOutput> apply(final RpcResult<T> input) {
List<BatchFailure> batchFailures = wrapBatchMeterFailuresForFlat(input, stepOffset);
ProcessFlatBatchOutputBuilder outputBuilder =
new ProcessFlatBatchOutputBuilder().setBatchFailure(batchFailures);
import com.google.common.util.concurrent.SettableFuture;
import java.util.ArrayList;
import java.util.List;
-import javax.annotation.Nonnull;
import org.opendaylight.openflowjava.protocol.api.keys.MessageTypeKey;
import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack;
class CallBackImpl implements FutureCallback<RpcResult<List<MultipartReply>>> {
@Override
- public void onSuccess(@Nonnull final RpcResult<List<MultipartReply>> result) {
+ public void onSuccess(final RpcResult<List<MultipartReply>> result) {
if (result.isSuccessful()) {
final List<MultipartReply> multipartReplies = result.getResult();
if (multipartReplies.isEmpty()) {
import java.util.Collections;
import java.util.List;
import java.util.Optional;
-import javax.annotation.Nonnull;
import org.opendaylight.openflowplugin.api.OFConstants;
import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack;
final SettableFuture<RpcResult<O>> finalFuture = SettableFuture.create();
Futures.addCallback(allFutures, new FutureCallback<List<RpcResult<O>>>() {
@Override
- public void onSuccess(@Nonnull final List<RpcResult<O>> results) {
+ public void onSuccess(final List<RpcResult<O>> results) {
final ArrayList<RpcError> errors = new ArrayList();
for (RpcResult<O> flowModResult : results) {
if (flowModResult == null) {
import java.util.Collections;
import java.util.List;
import java.util.Optional;
-import javax.annotation.Nonnull;
import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack;
import org.opendaylight.openflowplugin.api.openflow.device.Xid;
class CallBackImpl implements FutureCallback<RpcResult<List<MultipartReply>>> {
@Override
@SuppressWarnings("checkstyle:IllegalCatch")
- public void onSuccess(@Nonnull final RpcResult<List<MultipartReply>> result) {
+ public void onSuccess(final RpcResult<List<MultipartReply>> result) {
if (result.isSuccessful()) {
final List<MultipartReply> multipartReplies = result.getResult();
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.openflowplugin.impl.services.sal;
import com.google.common.base.Preconditions;
import com.google.common.util.concurrent.SettableFuture;
import java.util.ArrayList;
import java.util.List;
-import javax.annotation.Nonnull;
import org.opendaylight.yang.gen.v1.urn.opendaylight.experimenter.message.service.rev151020.SalExperimenterMessageService;
import org.opendaylight.yang.gen.v1.urn.opendaylight.experimenter.message.service.rev151020.SendExperimenterInputBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.experimenter.message.service.rev151020.SendExperimenterOutput;
Futures.addCallback(Futures.successfulAsList(partialResults),new FutureCallback<
List<RpcResult<SendExperimenterOutput>>>() {
@Override
- public void onSuccess(@Nonnull List<RpcResult<SendExperimenterOutput>> results) {
+ public void onSuccess(List<RpcResult<SendExperimenterOutput>> results) {
final ArrayList<RpcError> errors = new ArrayList<>();
final RpcResultBuilder<AddBundleMessagesOutput> rpcResultBuilder;
for (RpcResult<SendExperimenterOutput> res : results) {
import com.google.common.util.concurrent.SettableFuture;
import java.util.ArrayList;
import java.util.List;
-import javax.annotation.Nonnull;
import org.opendaylight.openflowplugin.api.OFConstants;
import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack;
Futures.addCallback(listListenableFuture, new FutureCallback<List<RpcResult<UpdateFlowOutput>>>() {
@Override
- public void onSuccess(@Nonnull final List<RpcResult<UpdateFlowOutput>> results) {
+ public void onSuccess(final List<RpcResult<UpdateFlowOutput>> results) {
final ArrayList<RpcError> errors = new ArrayList();
for (RpcResult<UpdateFlowOutput> flowModResult : results) {
if (flowModResult == null) {
}
@Override
- public void onSuccess(@Nonnull final RpcResult<AddFlowOutput> rpcResult) {
+ public void onSuccess(final RpcResult<AddFlowOutput> rpcResult) {
if (rpcResult.isSuccessful()) {
final FlowDescriptor flowDescriptor;
}
@Override
- public void onSuccess(@Nonnull final RpcResult<RemoveFlowOutput> result) {
+ public void onSuccess(final RpcResult<RemoveFlowOutput> result) {
if (result.isSuccessful()) {
if (LOG.isDebugEnabled()) {
LOG.debug("Flow remove finished without error for flow={}", input);
}
@Override
- public void onSuccess(@Nonnull final RpcResult<UpdateFlowOutput> updateFlowOutputRpcResult) {
+ public void onSuccess(final RpcResult<UpdateFlowOutput> updateFlowOutputRpcResult) {
final DeviceFlowRegistry deviceFlowRegistry = deviceContext.getDeviceFlowRegistry();
final UpdatedFlow updated = input.getUpdatedFlow();
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.MoreExecutors;
-import javax.annotation.Nonnull;
import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack;
import org.opendaylight.openflowplugin.impl.services.multilayer.MultiLayerGroupService;
Futures.addCallback(resultFuture, new FutureCallback<RpcResult<AddGroupOutput>>() {
@Override
- public void onSuccess(@Nonnull RpcResult<AddGroupOutput> result) {
+ public void onSuccess(RpcResult<AddGroupOutput> result) {
if (result.isSuccessful()) {
LOG.debug("adding group successful {}", input.getGroupId().getValue());
} else {
Futures.addCallback(resultFuture, new FutureCallback<RpcResult<UpdateGroupOutput>>() {
@Override
- public void onSuccess(@Nonnull RpcResult<UpdateGroupOutput> result) {
+ public void onSuccess(RpcResult<UpdateGroupOutput> result) {
if (result.isSuccessful()) {
if (LOG.isDebugEnabled()) {
LOG.debug("Group update with original id={} finished without error",
Futures.addCallback(resultFuture, new FutureCallback<RpcResult<RemoveGroupOutput>>() {
@Override
- public void onSuccess(@Nonnull RpcResult<RemoveGroupOutput> result) {
+ public void onSuccess(RpcResult<RemoveGroupOutput> result) {
if (result.isSuccessful()) {
if (LOG.isDebugEnabled()) {
LOG.debug("Group remove with id={} finished without error", input.getGroupId().getValue());
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.MoreExecutors;
-import javax.annotation.Nonnull;
import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack;
import org.opendaylight.openflowplugin.impl.services.multilayer.MultiLayerMeterService;
Futures.addCallback(resultFuture, new FutureCallback<RpcResult<AddMeterOutput>>() {
@Override
- public void onSuccess(@Nonnull RpcResult<AddMeterOutput> result) {
+ public void onSuccess(RpcResult<AddMeterOutput> result) {
if (result.isSuccessful()) {
if (LOG.isDebugEnabled()) {
LOG.debug("Meter add with id={} finished without error", input.getMeterId());
: updateMeter.handleServiceCall(input.getUpdatedMeter());
Futures.addCallback(resultFuture, new FutureCallback<RpcResult<UpdateMeterOutput>>() {
-
@Override
- public void onSuccess(@Nonnull RpcResult<UpdateMeterOutput> result) {
+ public void onSuccess(RpcResult<UpdateMeterOutput> result) {
if (result.isSuccessful()) {
if (LOG.isDebugEnabled()) {
LOG.debug("Meter update with id={} finished without error",
Futures.addCallback(resultFuture, new FutureCallback<RpcResult<RemoveMeterOutput>>() {
@Override
- public void onSuccess(@Nonnull RpcResult<RemoveMeterOutput> result) {
+ public void onSuccess(RpcResult<RemoveMeterOutput> result) {
if (result.isSuccessful()) {
if (LOG.isDebugEnabled()) {
LOG.debug("Meter remove with id={} finished without error", input.getMeterId());
import com.google.common.util.concurrent.SettableFuture;
import java.util.List;
import java.util.stream.Collectors;
-import javax.annotation.Nonnull;
import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack;
import org.opendaylight.openflowplugin.api.openflow.device.Xid;
Futures.addCallback(handleServiceCall(input), new FutureCallback<RpcResult<List<MultipartReply>>>() {
@Override
- public void onSuccess(@Nonnull final RpcResult<List<MultipartReply>> result) {
+ public void onSuccess(final RpcResult<List<MultipartReply>> result) {
if (result.isSuccessful()) {
future.set(RpcResultBuilder
.success(new SendExperimenterMpRequestOutputBuilder()
import java.math.BigInteger;
import java.util.List;
import java.util.stream.Collectors;
-import javax.annotation.Nonnull;
import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack;
import org.opendaylight.openflowplugin.api.openflow.device.Xid;
Futures.addCallback(handleServiceCall(input), new FutureCallback<RpcResult<List<MultipartReply>>>() {
@Override
@SuppressWarnings("checkstyle:IllegalCatch")
- public void onSuccess(@Nonnull final RpcResult<List<MultipartReply>> result) {
+ public void onSuccess(final RpcResult<List<MultipartReply>> result) {
if (result.isSuccessful()) {
final List<MultipartReply> multipartReplies = result.getResult();
if (multipartReplies.isEmpty()) {
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
import org.opendaylight.mdsal.binding.api.TransactionChainClosedException;
import org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier;
import org.opendaylight.openflowplugin.api.ConnectionException;
public void close() {
Futures.addCallback(stopGatheringData(), new FutureCallback<Void>() {
@Override
- public void onSuccess(@Nullable final Void result) {
+ public void onSuccess(final Void result) {
requestContexts.forEach(requestContext -> RequestContextUtil
.closeRequestContextWithRpcError(requestContext, CONNECTION_CLOSED));
}
// write end timestamp to state snapshot container
Futures.addCallback(newDataGathering, new FutureCallback<Boolean>() {
@Override
- public void onSuccess(@Nonnull final Boolean result) {
+ public void onSuccess(final Boolean result) {
StatisticsGatheringUtils.markDeviceStateSnapshotEnd(deviceInfo, deviceContext, result);
}
private final class InitialSubmitCallback implements FutureCallback<Boolean> {
@Override
- public void onSuccess(@Nullable final Boolean result) {
+ public void onSuccess(final Boolean result) {
contextChainMastershipWatcher
.onMasterRoleAcquired(deviceInfo, ContextChainMastershipState.INITIAL_GATHERING);
}
@Override
- public void onFailure(@Nonnull final Throwable throwable) {
+ public void onFailure(final Throwable throwable) {
contextChainMastershipWatcher.onNotAbleToStartMastershipMandatory(deviceInfo,
"Initial gathering statistics "
+ "unsuccessful: "
Futures.addCallback(gatheringSupplier.get(), new FutureCallback<Boolean>() {
@Override
- public void onSuccess(@Nonnull final Boolean result) {
+ public void onSuccess(final Boolean result) {
waitFuture.complete(result);
}
@Override
- public void onFailure(@Nonnull final Throwable throwable) {
+ public void onFailure(final Throwable throwable) {
waitFuture.completeExceptionally(throwable);
}
}, MoreExecutors.directExecutor());
import java.math.BigInteger;
import java.util.List;
import java.util.concurrent.atomic.AtomicLong;
-import javax.annotation.Nullable;
import org.opendaylight.mdsal.binding.api.NotificationPublishService;
import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack;
// hook notification publishing
Futures.addCallback(rpcResultListenableFuture, new FutureCallback<RpcResult<List<MultipartReply>>>() {
@Override
- public void onSuccess(@Nullable RpcResult<List<MultipartReply>> result) {
+ public void onSuccess(RpcResult<List<MultipartReply>> result) {
if (result != null && result.isSuccessful()) {
// transform rpc result (raw multipart) to notification
final N flowNotification = transformToNotification(result.getResult(), emulatedTxId);
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
<dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ <optional>true</optional>
</dependency>
<dependency>
<artifactId>javax.annotation-api</artifactId>
<optional>true</optional>
</dependency>
+ <dependency>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ <optional>true</optional>
+ </dependency>
<dependency>
<groupId>org.opendaylight.openflowplugin.model</groupId>
<artifactId>model-flow-base</artifactId>
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
-import javax.annotation.Nonnull;
import org.opendaylight.mdsal.binding.api.ClusteredDataTreeChangeListener;
import org.opendaylight.mdsal.binding.api.DataBroker;
import org.opendaylight.mdsal.binding.api.DataObjectModification.ModificationType;
}
@Override
- public void onDataTreeChanged(@Nonnull Collection<DataTreeModification<FlowCapableNode>> modifications) {
+ public void onDataTreeChanged(Collection<DataTreeModification<FlowCapableNode>> modifications) {
for (DataTreeModification<FlowCapableNode> modification : modifications) {
if (modification.getRootNode().getModificationType() == ModificationType.WRITE) {
LOG.info("Node connected: {}",