IndexDatabase.java revision 270
0N/A * See LICENSE.txt included in this distribution for the specific
0N/A * file and include the License file at LICENSE.txt.
0N/Apublic class IndexDatabase {
0N/A private boolean interrupted;
0N/A initialize();
0N/A initialize();
0N/A static void updateAll(ExecutorService executor, IndexChangedListener listener) throws Exception {
0N/A e.printStackTrace();
0N/A e.printStackTrace();
throw new FileNotFoundException("Failed to create root directory [" + indexDir.getAbsolutePath() + "]");
throw new FileNotFoundException("Failed to create root directory [" + spellDir.getAbsolutePath() + "]");
interrupted = false;
while (uidIter.term() != null && uidIter.term().field().equals("u") && uidIter.term().text().startsWith(startuid)) {
removeFile();
} catch (IOException e) {
} catch (IOException e) {
optimize();
public void run() {
} catch (Exception e) {
e.printStackTrace();
public void run() {
} catch (Exception e) {
e.printStackTrace();
public void optimize() {
dirty = false;
} catch (IOException e) {
} catch (IOException e) {
public void createSpellingSuggestions() {
} catch (IOException e) {
} catch (IOException e) {
private void setDirty() {
if (!dirty) {
dirty = true;
} catch (Exception e) {
e.printStackTrace();
setDirty();
if (d != null) {
setDirty();
if (interrupted) {
String uid = Util.uid(path, DateTools.timeToString(file.lastModified(), DateTools.Resolution.MILLISECOND)); // construct uid for doc
removeFile();
public void interrupt() {
interrupted = true;
} catch (Exception e) {
} catch (Exception e) {
} catch (Exception e) {
} catch (Exception e) {
if (p != null) {
return null;
return ret;