public synchronized void returnSender(DataSender sender) { if ( !isOpen) { sender.disconnect(); return; } //to do inuse.remove(sender); //just in case the limit has changed if ( notinuse.size() < this.getLimit() ) notinuse.add(sender); else try { sender.disconnect(); } catch (Exception e) { if (log.isDebugEnabled()) { log.debug(sm.getString( "PooledSender.senderDisconnectFail"), e); } } notifyAll(); }
public synchronized void returnSender(DataSender sender) { if ( !isOpen) { sender.disconnect(); return; } //to do inuse.remove(sender); //just in case the limit has changed if ( notinuse.size() < this.getLimit() ) notinuse.add(sender); else try { sender.disconnect(); } catch (Exception e) { if (log.isDebugEnabled()) { log.debug(sm.getString( "PooledSender.senderDisconnectFail"), e); } } notify(); }
public synchronized void returnSender(DataSender sender) { if ( !isOpen) { sender.disconnect(); return; } //to do inuse.remove(sender); //just in case the limit has changed if ( notinuse.size() < this.getLimit() ) notinuse.add(sender); else try { sender.disconnect(); } catch (Exception e) { if (log.isDebugEnabled()) { log.debug(sm.getString( "PooledSender.senderDisconnectFail"), e); } } notify(); }
public int getInUsePoolSize() { return queue.getInUsePoolSize(); }
public int getInPoolSize() { return queue.getInPoolSize(); }
public PooledSender() { queue = new SenderQueue(this,poolSize); }
public DataSender getSender() { return queue.getSender(getTimeout()); }
public int getInUsePoolSize() { return queue.getInUsePoolSize(); }
public int getInPoolSize() { return queue.getInPoolSize(); }
public PooledSender() { queue = new SenderQueue(this,poolSize); }
public DataSender getSender() { return queue.getSender(getMaxWait()); }
public PooledSender() { queue = new SenderQueue(this,poolSize); }
public int getInUsePoolSize() { return queue.getInUsePoolSize(); }
public boolean keepalive() { //do nothing, the pool checks on every return return (queue==null)?false:queue.checkIdleKeepAlive(); }
public int getInUsePoolSize() { return queue.getInUsePoolSize(); }
public DataSender getSender() { return queue.getSender(getTimeout()); }
public void setPoolSize(int poolSize) { this.poolSize = poolSize; queue.setLimit(poolSize); }
public PooledSender() { queue = new SenderQueue(this,poolSize); }
public DataSender getSender() { return queue.getSender(getMaxWait()); }
public void setPoolSize(int poolSize) { this.poolSize = poolSize; queue.setLimit(poolSize); }