2 * Copyright (c) 2018 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
9 package org.opendaylight.netvirt.elan.utils;
11 import java.util.concurrent.Executors;
12 import java.util.concurrent.ScheduledExecutorService;
13 import javax.inject.Singleton;
16 public class Scheduler implements AutoCloseable {
18 private final ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(1);
20 public ScheduledExecutorService getScheduledExecutorService() {
21 return scheduledExecutorService;
26 scheduledExecutorService.shutdown();