/** Implements <code>Runnable</code> interface. * Does full pass sweep in <code>RequestProcessor</code> thread. */ public synchronized void run() { synchronized (getLock()) { ChainItem previous = head; ChainItem ref = previous.next; while(ref != null) { if(ref.get() == null) { // Remove the item from data structure. previous.next = ref.next; } else { previous = ref; } ref = ref.next; } } }
/** Implements <code>Runnable</code> interface. * Does full pass sweep in <code>RequestProcessor</code> thread. */ public synchronized void run() { synchronized (getLock()) { ChainItem previous = head; ChainItem ref = previous.next; while(ref != null) { if(ref.get() == null) { // Remove the item from data structure. previous.next = ref.next; } else { previous = ref; } ref = ref.next; } } }
/** Implements <code>Runnable</code> interface. * Does full pass sweep in <code>RequestProcessor</code> thread. */ public synchronized void run() { synchronized (getLock()) { ChainItem previous = head; ChainItem ref = previous.next; while (ref != null) { if (ref.get() == null) { // Remove the item from data structure. previous.next = ref.next; } else { previous = ref; } ref = ref.next; } } }