618619620621622623624625626627628
{ sender.close(); w = new Waiter(lock, timeout); while (w.hasTime() && sender != null && error == null) { w.await(); } if (error != null) { throw new ConnectionException(error);
244245246247248249250251252253254
send(new ProtocolHeader(1, 0, 10)); Waiter w = new Waiter(lock, timeout); while (w.hasTime() && state == OPENING && error == null) { w.await(); } if (error != null) { ConnectionException t = error;
334335336337338339340341342343344
synchronized (lock) { Waiter w = new Waiter(lock, timeout); while (w.hasTime() && state != OPEN && error == null) { w.await(); } if (state != OPEN) { throw new ConnectionException("Timed out waiting for connection to be ready. Current state is :" + state);
611612613614615616617618619620621
state = CLOSING; connectionClose(replyCode, replyText, _options); Waiter w = new Waiter(lock, timeout); while (w.hasTime() && state == CLOSING && error == null) { w.await(); } if (error != null) { close(replyCode, replyText, _options);
640641642643644645646647648649650
654655656657658659660661662663664
{ Waiter w = new Waiter(commandsLock, timeout); while (w.hasTime() && (state != OPEN && state != CLOSED)) { checkFailoverRequired("Command was interrupted because of failover, before being sent"); w.await(); } } } switch (state)
723724725726727728729730731732733
e.rethrow(); } } } checkFailoverRequired("Command was interrupted because of failover, before being sent"); w.await(); } } if (state == CLOSED) {
855856857858859860861862863864865
checkFailoverRequired("Session sync was interrupted by failover."); if(log.isDebugEnabled()) { log.debug("%s waiting for[%d]: %d, %s", this, point, maxComplete, commands); } w.await(); } if (lt(maxComplete, point)) { if (state != CLOSED)
10621063106410651066106710681069107010711072
{ Waiter w = new Waiter(commandsLock, timeout); while (w.hasTime() && state != CLOSED) { checkFailoverRequired("close() was interrupted by failover."); w.await(); } if (state != CLOSED) { throw new SessionException("close() timed out");
11571158115911601161116211631164116511661167
{ Waiter w = new Waiter(stateLock, timeout); while (w.hasTime() && state == NEW) { checkFailoverRequired("Session opening was interrupted by failover."); w.await(); } } if (state != OPEN) {