Example usage for org.apache.commons.io FileCleaningTracker exitWhenFinished

List of usage examples for org.apache.commons.io FileCleaningTracker exitWhenFinished

Introduction

In this page you can find the example usage for org.apache.commons.io FileCleaningTracker exitWhenFinished.

Prototype

boolean exitWhenFinished

To view the source code for org.apache.commons.io FileCleaningTracker exitWhenFinished.

Click Source Link

Document

Whether to terminate the thread when the tracking is complete.

Usage

From source file:org.apache.solr.servlet.SolrDispatchFilter.java

@Override
public void destroy() {
    try {//from   w  ww.j  a va 2 s .co m
        FileCleaningTracker fileCleaningTracker = SolrRequestParsers.fileCleaningTracker;
        if (fileCleaningTracker != null) {
            fileCleaningTracker.exitWhenFinished();
        }
    } catch (Exception e) {
        log.warn("Exception closing FileCleaningTracker", e);
    } finally {
        SolrRequestParsers.fileCleaningTracker = null;
    }

    if (cores != null) {
        try {
            cores.shutdown();
        } finally {
            cores = null;
        }
    }
}

From source file:org.eclipse.rap.rwt.supplemental.fileupload.internal.CleaningTrackerUtil.java

static void stopCleaningTracker(ISessionStore store) {
    synchronized (store) {
        FileCleaningTracker tracker = (FileCleaningTracker) store.getAttribute(TRACKER_ATTR);
        if (tracker != null) {
            tracker.exitWhenFinished();
            store.removeAttribute(TRACKER_ATTR);
        }/* w w  w.j  a v  a  2s  .  c  o  m*/
    }
}