You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2011/04/26 14:18:31 UTC
svn commit: r1096737 -
/lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/index/DocumentsWriterPerThreadPool.java
Author: mikemccand
Date: Tue Apr 26 12:18:30 2011
New Revision: 1096737
URL: http://svn.apache.org/viewvc?rev=1096737&view=rev
Log:
add some more todos
Modified:
lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/index/DocumentsWriterPerThreadPool.java
Modified: lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/index/DocumentsWriterPerThreadPool.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/index/DocumentsWriterPerThreadPool.java?rev=1096737&r1=1096736&r2=1096737&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/index/DocumentsWriterPerThreadPool.java (original)
+++ lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/index/DocumentsWriterPerThreadPool.java Tue Apr 26 12:18:30 2011
@@ -204,6 +204,7 @@ public abstract class DocumentsWriterPer
* Returns an iterator providing access to all {@link ThreadState}
* instances.
*/
+ // TODO: new Iterator per indexed doc is overkill...?
public Iterator<ThreadState> getAllPerThreadsIterator() {
return getPerThreadsIterator(this.perThreads.length);
}
@@ -217,6 +218,7 @@ public abstract class DocumentsWriterPer
* has been called.
*
*/
+ // TODO: new Iterator per indexed doc is overkill...?
public Iterator<ThreadState> getActivePerThreadsIterator() {
return getPerThreadsIterator(numThreadStatesActive);
}
@@ -246,6 +248,7 @@ public abstract class DocumentsWriterPer
*/
protected ThreadState minContendedThreadState() {
ThreadState minThreadState = null;
+ // TODO: new Iterator per indexed doc is overkill...?
final Iterator<ThreadState> it = getActivePerThreadsIterator();
while (it.hasNext()) {
final ThreadState state = it.next();