2 * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.netvirt.vpnmanager.iplearn;
10 import com.google.common.util.concurrent.ListenableFuture;
11 import java.util.Collections;
12 import java.util.List;
13 import java.util.concurrent.Callable;
14 import org.opendaylight.netvirt.vpnmanager.iplearn.model.MacEntry;
16 public class IpMonitorStartTask implements Callable<List<ListenableFuture<Void>>> {
17 private final MacEntry macEntry;
18 private final Long arpMonitorProfileId;
19 private final AlivenessMonitorUtils alivenessMonitorUtils;
21 public IpMonitorStartTask(MacEntry macEntry, Long profileId, AlivenessMonitorUtils alivenessMonitorUtils) {
22 this.macEntry = macEntry;
23 this.arpMonitorProfileId = profileId;
24 this.alivenessMonitorUtils = alivenessMonitorUtils;
28 public List<ListenableFuture<Void>> call() {
29 alivenessMonitorUtils.startIpMonitoring(macEntry, arpMonitorProfileId);
30 return Collections.emptyList();