| | |
| | | /** The queue used to hold generated entries until they can be read. */ |
| | | private LinkedBlockingQueue<TemplateEntry> entryQueue; |
| | | |
| | | /** The background thread being used to actually generate the entries. */ |
| | | private MakeLDIFInputStreamThread generatorThread; |
| | | |
| | | /** The template file to use to generate the entries. */ |
| | | private TemplateFile templateFile; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new MakeLDIF input stream that will generate entries based on the |
| | | * provided template file. |
| | |
| | | */ |
| | | public MakeLDIFInputStream(TemplateFile templateFile) |
| | | { |
| | | this.templateFile = templateFile; |
| | | |
| | | allGenerated = false; |
| | | closed = false; |
| | | entryQueue = new LinkedBlockingQueue<>(10); |
| | |
| | | ioException = ioe; |
| | | } |
| | | |
| | | generatorThread = new MakeLDIFInputStreamThread(this, templateFile); |
| | | generatorThread.start(); |
| | | /* The background thread being used to actually generate the entries. */ |
| | | new MakeLDIFInputStreamThread(this, templateFile).start(); |
| | | } |
| | | |
| | | |