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 boolean
closed
private java.util.concurrent.Semaphore
permits
private java.util.Queue<IndexWriter.Event>
queue
private IndexWriter
writer
-
Constructor Summary
Constructors Constructor Description EventQueue(IndexWriter writer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
acquire()
(package private) boolean
add(IndexWriter.Event event)
void
close()
(package private) void
processEvents()
private void
processEventsInternal()
-
-
-
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:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
-