void idleAbort() { synchronized (messageCacheLock) { if (idleState == IDLE && protocol != null) { protocol.idleAbort(); idleState = ABORTING; } } }
void idleAbort() { synchronized (messageCacheLock) { if (idleState == IDLE && protocol != null) { protocol.idleAbort(); idleState = ABORTING; } } }
private void waitIfIdle() throws ProtocolException { assert Thread.holdsLock(pool); while (pool.idleState != ConnectionPool.RUNNING) { if (pool.idleState == ConnectionPool.IDLE) { pool.idleProtocol.idleAbort(); pool.idleState = ConnectionPool.ABORTING; } try { // give up lock and wait to be not idle pool.wait(); } catch (InterruptedException ex) { // If someone is trying to interrupt us we can't keep going // around the loop waiting for IDLE to complete, but we can't // just return because callers expect the idleState to be // RUNNING when we return. Throwing this exception seems // like the best choice. throw new ProtocolException("Interrupted waitIfIdle", ex); } } }
private void waitIfIdle() throws ProtocolException { assert Thread.holdsLock(pool); while (pool.idleState != ConnectionPool.RUNNING) { if (pool.idleState == ConnectionPool.IDLE) { pool.idleProtocol.idleAbort(); pool.idleState = ConnectionPool.ABORTING; } try { // give up lock and wait to be not idle pool.wait(); } catch (InterruptedException ex) { // If someone is trying to interrupt us we can't keep going // around the loop waiting for IDLE to complete, but we can't // just return because callers expect the idleState to be // RUNNING when we return. Throwing this exception seems // like the best choice. throw new ProtocolException("Interrupted waitIfIdle", ex); } } }
void idleAbortWait() { synchronized (messageCacheLock) { if (idleState == IDLE && protocol != null) { protocol.idleAbort(); idleState = ABORTING; // read responses until OK or connection failure try { for (;;) { if (!handleIdle(false)) break; } } catch (Exception ex) { // assume it's a connection failure; nothing more to do logger.log(Level.FINEST, "Exception in idleAbortWait", ex); } logger.finest("IDLE aborted"); } } }
void idleAbortWait() { synchronized (messageCacheLock) { if (idleState == IDLE && protocol != null) { protocol.idleAbort(); idleState = ABORTING; // read responses until OK or connection failure try { for (;;) { if (!handleIdle(false)) break; } } catch (Exception ex) { // assume it's a connection failure; nothing more to do logger.log(Level.FINEST, "Exception in idleAbortWait", ex); } logger.finest("IDLE aborted"); } } }
} else { logger.finest("waitIfIdle: abort IDLE"); protocol.idleAbort(); idleState = ABORTING;
} else { logger.finest("waitIfIdle: abort IDLE"); protocol.idleAbort(); idleState = ABORTING;
void idleAbort() { synchronized (messageCacheLock) { if (idleState == IDLE && protocol != null) { protocol.idleAbort(); idleState = ABORTING; } } }
void idleAbort() { synchronized (messageCacheLock) { if (idleState == IDLE && protocol != null) { protocol.idleAbort(); idleState = ABORTING; } } }
void idleAbort() { synchronized (messageCacheLock) { if (idleState == IDLE && protocol != null) { protocol.idleAbort(); idleState = ABORTING; } } }
void idleAbort() { synchronized (messageCacheLock) { if (idleState == IDLE && protocol != null) { protocol.idleAbort(); idleState = ABORTING; } } }
void waitIfIdle() throws ProtocolException { assert Thread.holdsLock(messageCacheLock); while (idleState != RUNNING) { if (idleState == IDLE) { protocol.idleAbort(); idleState = ABORTING; } try { // give up lock and wait to be not idle messageCacheLock.wait(); } catch (InterruptedException ex) { } } }
private void waitIfIdle() throws ProtocolException { assert Thread.holdsLock(pool); while (pool.idleState != ConnectionPool.RUNNING) { if (pool.idleState == ConnectionPool.IDLE) { pool.idleProtocol.idleAbort(); pool.idleState = ConnectionPool.ABORTING; } try { // give up lock and wait to be not idle pool.wait(); } catch (InterruptedException ex) { } } }
void waitIfIdle() throws ProtocolException { assert Thread.holdsLock(messageCacheLock); while (idleState != RUNNING) { if (idleState == IDLE) { protocol.idleAbort(); idleState = ABORTING; } try { // give up lock and wait to be not idle messageCacheLock.wait(); } catch (InterruptedException ex) { } } }
private void waitIfIdle() throws ProtocolException { assert Thread.holdsLock(pool); while (pool.idleState != ConnectionPool.RUNNING) { if (pool.idleState == ConnectionPool.IDLE) { pool.idleProtocol.idleAbort(); pool.idleState = ConnectionPool.ABORTING; } try { // give up lock and wait to be not idle pool.wait(); } catch (InterruptedException ex) { } } }
void idleAbortWait() { synchronized (messageCacheLock) { if (idleState == IDLE && protocol != null) { protocol.idleAbort(); idleState = ABORTING; // read responses until OK or connection failure try { for (;;) { if (!handleIdle(false)) break; } } catch (Exception ex) { // assume it's a connection failure; nothing more to do logger.log(Level.FINEST, "Exception in idleAbortWait", ex); } logger.finest("IDLE aborted"); } } }
void idleAbortWait() { synchronized (messageCacheLock) { if (idleState == IDLE && protocol != null) { protocol.idleAbort(); idleState = ABORTING; // read responses until OK or connection failure try { for (;;) { if (!handleIdle(false)) break; } } catch (Exception ex) { // assume it's a connection failure; nothing more to do logger.log(Level.FINEST, "Exception in idleAbortWait", ex); } logger.finest("IDLE aborted"); } } }