Remove redundant names in paths
[netvirt.git] / elanmanager / impl / src / main / java / org / opendaylight / netvirt / elan / utils / Scheduler.java
1 /*
2  * Copyright (c) 2018 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
3  *
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
7  */
8
9 package org.opendaylight.netvirt.elan.utils;
10
11 import java.util.concurrent.Executors;
12 import java.util.concurrent.ScheduledExecutorService;
13 import javax.inject.Singleton;
14
15 @Singleton
16 public class Scheduler implements AutoCloseable {
17
18     private final ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(1);
19
20     public ScheduledExecutorService getScheduledExecutorService() {
21         return scheduledExecutorService;
22     }
23
24     @Override
25     public void close() {
26         scheduledExecutorService.shutdown();
27     }
28 }