Example usage for org.apache.lucene.store MockDirectoryWrapper isOpen

List of usage examples for org.apache.lucene.store MockDirectoryWrapper isOpen

Introduction

In this page you can find the example usage for org.apache.lucene.store MockDirectoryWrapper isOpen.

Prototype

public boolean isOpen() 

Source Link

Usage

From source file:org.elasticsearch.ElasticsearchTestCase.java

License:Apache License

public static void ensureAllFilesClosed() throws IOException {
    try {//from w w  w .j av a2  s. com
        for (MockDirectoryWrapper w : MockDirectoryHelper.wrappers) {
            if (w.isOpen()) {
                w.close();
            }
        }
    } finally {
        forceClearMockWrappers();
    }
}

From source file:org.elasticsearch.ElasticsearchTestCase.java

License:Apache License

public static boolean hasUnclosedWrapper() {
    for (MockDirectoryWrapper w : MockDirectoryHelper.wrappers) {
        if (w.isOpen()) {
            return true;
        }/*from  ww w  . j  av a2s  .c  o m*/
    }
    return false;
}