/** * logs a loop when closing a resource with level DEBUG * This method is for debugging purposes only and * is subject to change or removal w/o notice. * NOT a supported API. * @param desc vararg description * @since 0.9.8 */ public void logCloseLoop(Object... desc) { logCloseLoop(Log.DEBUG, desc); }
void destroy() { if (!_closed.compareAndSet(false,true)) { _log.logCloseLoop("destroy()"); return; } _flusher.cancel(); synchronized (_dataLock) { _dataLock.notifyAll(); } }
/** * nonblocking close - * Only for use inside package */ public void closeInternal() { if (!_closed.compareAndSet(false,true)) { _log.logCloseLoop("close internal"); return; } _flusher.cancel(); _streamError.compareAndSet(null, new IOException("Output stream closed")); clearData(true); }
if (!_closed.compareAndSet(false,true)) { synchronized (_dataLock) { _dataLock.notifyAll(); } _log.logCloseLoop("MOS"); return;
public void close(boolean allowRequeue) { if (!_closed.compareAndSet(false,true)) { _log.logCloseLoop("NTCPConnection", this); return; } if (_log.shouldLog(Log.INFO)) { _log.info("Closing connection " + toString(), new Exception("cause")); } NTCPConnection toClose = locked_close(allowRequeue); if (toClose != null && toClose != this) { // won't happen as of 0.9.37 if (_log.shouldLog(Log.WARN)) _log.warn("Multiple connections on remove, closing " + toClose + " (already closed " + this + ")"); _context.statManager().addRateData("ntcp.multipleCloseOnRemove", toClose.getUptime()); toClose.close(); } }
if (!_isDestroyed.compareAndSet(false,true)) { _log.logCloseLoop("I2PSocketManager", getName()); return;
if (!_closed.compareAndSet(false,true)) { log.logCloseLoop("I2PSocket",_localPeer,"-->",_remotePeer,_connection); return;
void destroy() { if (!_closed.compareAndSet(false,true)) { _log.logCloseLoop("destroy()"); return; } _flusher.cancel(); synchronized (_dataLock) { _dataLock.notifyAll(); } }
/** * nonblocking close - * Only for use inside package */ public void closeInternal() { if (!_closed.compareAndSet(false,true)) { _log.logCloseLoop("close internal"); return; } _flusher.cancel(); _streamError.compareAndSet(null, new IOException("Output stream closed")); clearData(true); }
if (!_closed.compareAndSet(false,true)) { synchronized (_dataLock) { _dataLock.notifyAll(); } _log.logCloseLoop("MOS"); return;
if (!_isDestroyed.compareAndSet(false,true)) { _log.logCloseLoop("I2PSocketManager", getName()); return;
if (!_closed.compareAndSet(false,true)) { log.logCloseLoop("I2PSocket",_localPeer,"-->",_remotePeer,_connection); return;