package com.hazelcast.client;

public abstract class ClientRunnable implements Runnable{
	protected volatile boolean running = true;
	protected final Object monitor = new Object(); 
	
	
	protected abstract void customRun() throws InterruptedException;
	
	public void run() {
		while(running){
			try {
				customRun();
			} catch (InterruptedException e) {
				return;
			}
		}
		notifyMonitor();
	}

	public void shutdown(){
		synchronized (monitor) {
			if(running){
				this.running = false;
				try {
					monitor.wait();
				} catch (InterruptedException e) {
				}
			}
		}
	}
	
	protected void notifyMonitor() {
		synchronized (monitor) {
			monitor.notifyAll();
		}
	}
}

@@ -571,33 +571,39 @@
 ruptedException 
-e
+ignored
 ) %7B%0D%0A%09%09%09%09%7D%0D%0A%09%09%09%7D

Clean up