Examples of ThreadEvaluatorException


Examples of org.apache.oodt.cas.pushpull.exceptions.ThreadEvaluatorException

    public synchronized void startTrackingDownloadRuntimeForFile(File file)
            throws ThreadEvaluatorException {
        long curTime = System.currentTimeMillis();
        if (++this.currentThreadCount > this.MAX_THREADS)
            throw new ThreadEvaluatorException(
                    "Number of threads exceeds max allows threads");
        updateThreadCounts(curTime);
        fileAndDownloadingFileInfo.put(file, new DownloadingFileInfo(file,
                curTime, this.currentThreadCount));
    }
View Full Code Here

Examples of org.apache.oodt.cas.pushpull.exceptions.ThreadEvaluatorException

                this.downloadSpeedsForEachThread[avgThreadCountForFile] = downloadSpeed;
            else
                this.downloadSpeedsForEachThread[avgThreadCountForFile] = (currentAvgSpeed + downloadSpeed) / 2;
        } catch (Exception e) {
            e.printStackTrace();
            throw new ThreadEvaluatorException("Failed to register file "
                    + file + " as downloaded : " + e.getMessage());
        } finally {
            currentThreadCount--;
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.