Package org.apache.lucene.index
Class IndexWriter.EventQueue
- java.lang.Object
-
- org.apache.lucene.index.IndexWriter.EventQueue
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
- Enclosing class:
- IndexWriter
static final class IndexWriter.EventQueue extends java.lang.Object implements java.io.Closeable
-
-
Field Summary
Fields Modifier and Type Field Description private booleanclosedprivate java.util.concurrent.Semaphorepermitsprivate java.util.Queue<IndexWriter.Event>queueprivate IndexWriterwriter
-
Constructor Summary
Constructors Constructor Description EventQueue(IndexWriter writer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidacquire()(package private) booleanadd(IndexWriter.Event event)voidclose()(package private) voidprocessEvents()private voidprocessEventsInternal()
-
-
-
Field Detail
-
closed
private volatile boolean closed
-
permits
private final java.util.concurrent.Semaphore permits
-
queue
private final java.util.Queue<IndexWriter.Event> queue
-
writer
private final IndexWriter writer
-
-
Constructor Detail
-
EventQueue
EventQueue(IndexWriter writer)
-
-
Method Detail
-
acquire
private void acquire()
-
add
boolean add(IndexWriter.Event event)
-
processEvents
void processEvents() throws java.io.IOException- Throws:
java.io.IOException
-
processEventsInternal
private void processEventsInternal() throws java.io.IOException- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
-