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.List;
12 import java.util.concurrent.Callable;
13 import org.opendaylight.netvirt.vpnmanager.iplearn.model.MacEntry;
15 public class IpMonitorStartTask implements Callable<List<ListenableFuture<Void>>> {
16 private final MacEntry macEntry;
17 private final Long arpMonitorProfileId;
18 private final AlivenessMonitorUtils alivenessMonitorUtils;
20 public IpMonitorStartTask(MacEntry macEntry, Long profileId, AlivenessMonitorUtils alivenessMonitorUtils) {
21 this.macEntry = macEntry;
22 this.arpMonitorProfileId = profileId;
23 this.alivenessMonitorUtils = alivenessMonitorUtils;
27 public List<ListenableFuture<Void>> call() {
28 alivenessMonitorUtils.startIpMonitoring(macEntry, arpMonitorProfileId);