private void doLoop(int ms) { AbstractFileSystem system = this.system.get(); if (system == null) { // end for ever the fs does not exist no more return; } if ((en == null) || !en.hasMoreElements()) { // start again from root en = NbCollections.checkedEnumerationByFilter(existingFolders(system), AbstractFolder.class, true); } for (int i = 0; (i < REFRESH_COUNT) && en.hasMoreElements(); i++) { AbstractFolder fo = en.nextElement(); if ((fo != null) && (!fo.isFolder() || fo.isInitialized())) { fo.refresh(); } if (refreshTime <= 0) { // after each refresh check the current value of refreshTime // again and if it goes to zero exit as fast a you can return; } } // clear the queue if (!en.hasMoreElements()) { en = null; } }
private void doLoop (int ms) { AbstractFileSystem system = (AbstractFileSystem)this.system.get (); if (system == null) { // end for ever the fs does not exist no more return; } if (en == null || !en.hasMoreElements ()) { // start again from root en = existingFolders (system); } for (int i = 0; i < REFRESH_COUNT && en.hasMoreElements (); i++) { AbstractFolder fo = (AbstractFolder)en.nextElement (); if (fo != null && (!fo.isFolder() || fo.isInitialized ())) { fo.refresh (); } if (refreshTime <= 0) { // after each refresh check the current value of refreshTime // again and if it goes to zero exit as fast a you can return; } } // clear the queue if (!en.hasMoreElements ()) { en = null; } }
private void doLoop (int ms) { AbstractFileSystem system = (AbstractFileSystem)this.system.get (); if (system == null) { // end for ever the fs does not exist no more return; } if (en == null || !en.hasMoreElements ()) { // start again from root en = existingFolders (system); } for (int i = 0; i < REFRESH_COUNT && en.hasMoreElements (); i++) { AbstractFolder fo = (AbstractFolder)en.nextElement (); if (fo != null && (!fo.isFolder() || fo.isInitialized ())) { fo.refresh (); } if (refreshTime <= 0) { // after each refresh check the current value of refreshTime // again and if it goes to zero exit as fast a you can return; } } // clear the queue if (!en.hasMoreElements ()) { en = null; } }