*/
package org.opendaylight.genius.alivenessmonitor.protocols.internal;
-import static org.opendaylight.infrautils.utils.concurrent.JdkFutures.addErrorLogging;
+import static org.opendaylight.infrautils.utils.concurrent.LoggingFutures.addErrorLogging;
import com.google.common.base.Optional;
import com.google.common.base.Strings;
return split[2];
}
- private List<ActionInfo> getInterfaceActions(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf
+ private static List<ActionInfo> getInterfaceActions(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf
.interfaces.rev140508.interfaces.state.Interface interfaceState, long portNum)
throws InterruptedException, ExecutionException {
Class<? extends InterfaceType> intfType;
return ethernetPacket;
}
- private String colonize(String orig) {
+ private static String colonize(String orig) {
return orig.replaceAll("(?<=..)(..)", ":$1");
}
return interfaceName + EtherTypes.LLDP;
}
- private String getInterfaceName(EndpointType endpoint) {
- String interfaceName = null;
- if (endpoint instanceof Interface) {
- interfaceName = ((Interface) endpoint).getInterfaceName();
- }
- return interfaceName;
+ private static String getInterfaceName(EndpointType endpoint) {
+ return endpoint instanceof Interface ? ((Interface) endpoint).getInterfaceName() : null;
}
}
import org.opendaylight.genius.mdsalutil.MDSALUtil;
import org.opendaylight.infrautils.diagstatus.ServiceState;
import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
-import org.opendaylight.infrautils.utils.concurrent.JdkFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
import org.opendaylight.mdsal.eos.binding.api.Entity;
import org.opendaylight.mdsal.eos.binding.api.EntityOwnershipCandidateRegistration;
import org.opendaylight.mdsal.eos.binding.api.EntityOwnershipChange;
AddExternalTunnelEndpointInput addExternalTunnelEndpointInput =
new AddExternalTunnelEndpointInputBuilder().setTunnelType(tunnelType)
.setDestinationIp(dcgwIP).build();
- JdkFutures.addErrorLogging(itmRpcService.addExternalTunnelEndpoint(addExternalTunnelEndpointInput),
+ LoggingFutures.addErrorLogging(itmRpcService.addExternalTunnelEndpoint(addExternalTunnelEndpointInput),
LOG, "addExternalTunnelEndpoint");
}
RemoveExternalTunnelEndpointInput removeExternalTunnelEndpointInput =
new RemoveExternalTunnelEndpointInputBuilder().setTunnelType(tunnelType)
.setDestinationIp(dcgwIP).build();
- JdkFutures.addErrorLogging(itmRpcService.removeExternalTunnelEndpoint(removeExternalTunnelEndpointInput),
+ LoggingFutures.addErrorLogging(itmRpcService.removeExternalTunnelEndpoint(removeExternalTunnelEndpointInput),
LOG, "removeExternalTunnelEndpoint");
}
import org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier;
import org.opendaylight.controller.md.sal.binding.api.DataTreeModification;
import org.opendaylight.infrautils.utils.concurrent.Executors;
-import org.opendaylight.infrautils.utils.concurrent.JdkFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
import org.opendaylight.yangtools.concepts.ListenerRegistration;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.slf4j.Logger;
* were exceptions in the listener.
*/
public void asyncFireDataTreeChangeListener() {
- JdkFutures.addErrorLogging(executor.submit(() -> fireDataTreeChangeListener()),
+ LoggingFutures.addErrorLogging(executor.submit(() -> fireDataTreeChangeListener()),
LOG, "fireDataTreeChangeListener() eventually failed");
}