/** * The main loop of this worker. * If initialization succeeds, this method will only return * after {@link #shutdown shutdown()}. Only one thread can * execute the main loop at any time. */ public void run() { if (this.workerThread == null) { this.workerThread = Thread.currentThread(); } while (this.workerThread == Thread.currentThread()) { try { // remove the next reference and process it Reference<?> ref = refQueue.remove(); refHandler.handleReference(ref); } catch (InterruptedException e) { //@@@ is logging really necessary? this here is the //@@@ only reason for having a log in this class if (log.isDebugEnabled()) { log.debug(this.toString() + " interrupted", e); } } } }
/** * The main loop of this worker. * If initialization succeeds, this method will only return * after {@link #shutdown shutdown()}. Only one thread can * execute the main loop at any time. */ public void run() { if (this.workerThread == null) { this.workerThread = Thread.currentThread(); } while (this.workerThread == Thread.currentThread()) { try { // remove the next reference and process it Reference<?> ref = refQueue.remove(); refHandler.handleReference(ref); } catch (InterruptedException e) { //@@@ is logging really necessary? this here is the //@@@ only reason for having a log in this class if (log.isDebugEnabled()) { log.debug(this.toString() + " interrupted", e); } } } }
/** * The main loop of this worker. * If initialization succeeds, this method will only return * after {@link #shutdown shutdown()}. Only one thread can * execute the main loop at any time. */ public void run() { if (this.workerThread == null) { this.workerThread = Thread.currentThread(); } while (this.workerThread == Thread.currentThread()) { try { // remove the next reference and process it Reference<?> ref = refQueue.remove(); refHandler.handleReference(ref); } catch (InterruptedException e) { //@@@ is logging really necessary? this here is the //@@@ only reason for having a log in this class if (log.isDebugEnabled()) { log.debug(this.toString() + " interrupted", e); } } } }
/** * The main loop of this worker. * If initialization succeeds, this method will only return * after {@link #shutdown shutdown()}. Only one thread can * execute the main loop at any time. */ public void run() { if (this.workerThread == null) { this.workerThread = Thread.currentThread(); } while (this.workerThread == Thread.currentThread()) { try { // remove the next reference and process it Reference<?> ref = refQueue.remove(); refHandler.handleReference(ref); } catch (InterruptedException e) { //@@@ is logging really necessary? this here is the //@@@ only reason for having a log in this class if (log.isDebugEnabled()) { log.debug(this.toString() + " interrupted", e); } } } }
/** * The main loop of this worker. * If initialization succeeds, this method will only return * after {@link #shutdown shutdown()}. Only one thread can * execute the main loop at any time. */ public void run() { if (this.workerThread == null) { this.workerThread = Thread.currentThread(); } while (this.workerThread == Thread.currentThread()) { try { // remove the next reference and process it Reference<?> ref = refQueue.remove(); refHandler.handleReference(ref); } catch (InterruptedException e) { //@@@ is logging really necessary? this here is the //@@@ only reason for having a log in this class if (log.isDebugEnabled()) { log.debug(this.toString() + " interrupted", e); } } } }