Java Thread Future getSysExeNameList()

Here you can find the source of getSysExeNameList()

Description

get Sys Exe Name List

License

Open Source License

Declaration

public static List<String> getSysExeNameList() 

Method Source Code

//package com.java2s;
/*// w ww.  j av a 2  s .co  m
 * Jvifm - Java vifm (File Manager with vi like key binding)
 *
 * Copyright (C) 2006 wsn <shrek.wang@gmail.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 */

import java.util.ArrayList;

import java.util.List;

import java.util.concurrent.FutureTask;

public class Main {
    private static List<String> sysExeNameList = null;
    private static boolean loaded = false;
    private static FutureTask<String> ft = null;

    public static List<String> getSysExeNameList() {
        if (loaded)
            return sysExeNameList;
        try {
            if (ft.get().equals("ok")) {
                loaded = true;
                return sysExeNameList;
            }
        } catch (Exception e) {

        }
        return new ArrayList<String>();
    }
}

Related

  1. getFailedFuture(Throwable throwable)
  2. getFuture(Future future, String message)
  3. getMinIn(Map> responses)
  4. getResults(Iterable> futures)
  5. getSilently(Future future)
  6. getUninterruptibly(Future future)
  7. invokeTask(String threadName, Callable callable)
  8. isSuccessful(CompletableFuture f)
  9. nanoTime()