List of usage examples for org.apache.lucene.index LiveIndexWriterConfig getRAMBufferSizeMB
public double getRAMBufferSizeMB()
From source file:de.walware.statet.r.internal.core.rhelp.index.REnvIndexWriter.java
License:Open Source License
public void endPackage() throws AbortIndexException { if (DEBUG) {// w w w .j a v a 2s . c o m this.status.add(new Status(IStatus.INFO, RCore.PLUGIN_ID, "Finishing package.")); //$NON-NLS-1$ final Runtime runtime = Runtime.getRuntime(); final long maxMemory = runtime.maxMemory(); final long allocatedMemory = runtime.totalMemory(); final long freeMemory = runtime.freeMemory(); final LiveIndexWriterConfig config = this.luceneWriter.getConfig(); final StringBuilder sb = new StringBuilder("Memory status:\n"); //$NON-NLS-1$ sb.append("TempBuilder-capycity: ").append(this.worker.tempBuilder.capacity()).append('\n'); //$NON-NLS-1$ sb.append("Lucene-buffersize: ").append((long) (config.getRAMBufferSizeMB() * 1024.0)).append('\n'); //$NON-NLS-1$ sb.append("Memory-free: ").append(freeMemory / 1024L).append('\n'); //$NON-NLS-1$ sb.append("Memory-total: ").append(allocatedMemory / 1024L).append('\n'); //$NON-NLS-1$ sb.append("Memory-max: ").append(maxMemory / 1024L).append('\n'); //$NON-NLS-1$ this.status.add(new Status(IStatus.INFO, RCore.PLUGIN_ID, sb.toString())); } if (this.currentPackage == null) { return; } this.currentPackage.freeze(); this.currentPackage = null; }