Project

General

Profile

« Previous | Next » 

Revision 3199

Added by Jing Tao about 17 years ago

Change the constructor to prive so other class can only go through getInstance to get object.

View differences:

IndexingQueue.java
50 50
		Integer.parseInt(MetaCatUtil.getOption("numberOfIndexingThreads"));
51 51
	private int sleepTime = 2000; 
52 52

  
53
    public IndexingQueue() {
53
    private IndexingQueue() {
54 54
	    for (int i = 0; i < NUMBEROFINDEXINGTHREADS; i++) {
55 55
	      Thread thread = new IndexingTask();
56 56
	      thread.start();
......
145 145
    				  logMetacat.warn("Calling buildIndex for " + docid);
146 146
    				  DocumentImpl doc = new DocumentImpl(docid, false);
147 147
    				  doc.buildIndex();
148
    				  logMetacat.warn("finish building index for doicd "+docid);
148 149
    			  } else {
149 150
    				  logMetacat.warn("Couldn't find the docid:" + docid 
150 151
	                			+ " in xml_documents table");

Also available in: Unified diff