Changeset 8589


Ignore:
Timestamp:
2004-11-17T13:34:59+13:00 (19 years ago)
Author:
mdewsnip
Message:

Removed some more dead code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java

    r8588 r8589  
    101101    private GShellProgressMonitor import_monitor = null;
    102102
    103     /** Holds a reference to the thread responsible for closing the collection. If non-null then only calls from the given thread will see the collection is non-ready. All other threads will have to wait until closing thread, and all of it consequential calls, are completely finished. */
    104     private Thread closing_thread = null;
    105 
    106103    /** The name of the standard lock file. */
    107104    static final public String LOCK_FILE = "gli.lck";
     
    215212    public void closeCollection() {
    216213    DebugStream.println("Close collection: " + collection.getName());
    217     // We set the closing thread, as it should be the only one who can actually see the collection is closed, at least until the closing thread expires.
    218     closing_thread = Thread.currentThread();
     214
    219215    // Remove the lock on this file, then remove the collection.
    220216    String collection_dir;
     
    244240        Gatherer.g_man.refresh(COLLECTION_CLOSED, false);
    245241    }
    246     // All of the consequences of a close should have been processed by now, so others should now see the collection as non-ready.
    247     closing_thread = null;
    248242    }
    249243
     
    11801174    }
    11811175    }
     1176
     1177
    11821178    /** Determine if the manager is ready for actions apon its collection.
    11831179     * @return A <i>boolean</i> which is <i>true</i> to indicate a collection has been loaded and thus the collection is ready for editing, <i>false</i> otherwise.
     
    11921188    }
    11931189
    1194     public synchronized boolean reallyReady() {
    1195     // If the closing thread is non-null we should only allow that thread to see the collection as closed.
    1196     if(closing_thread != null) {
    1197         // Only the closing thread sees the truth
    1198         if(Thread.currentThread() == closing_thread) {
    1199         return (collection == null);
    1200         }
    1201         // All other threads are told a lie.
    1202         else {
    1203         return true;
    1204         }
    1205     }
    1206     else {
    1207         if(collection != null) {
    1208         return true;
    1209         }
    1210         else {
    1211         return false;
    1212         }
    1213     }
    1214     }
    12151190
    12161191    /** This method associates the collection build monitor with the build monitor created in CreatePane.
Note: See TracChangeset for help on using the changeset viewer.