@Override
public synchronized WatchKey take() throws ClosedWatchServiceException, InterruptedException {
while ( true ) {
if ( wsClose || isClose ) {
throw new ClosedWatchServiceException();
} else if ( events.get( this ).size() > 0 ) {
return events.get( this ).poll();
} else {
try {
this.wait();