/** * @see SimplePool#getAllocatedCount() * @return the allocated count. */ public int getAllocatedCount() { return this.pool.getAllocatedCount(); }
/** * @param connectionWaitTimeout the new timeout. * @see SimplePool#setWaitTimeout(long) */ public void setConnectionWaitTimeout(int connectionWaitTimeout) { this.pool.setWaitTimeout(connectionWaitTimeout); }
/** * Remove (close) any unused sessions in the pool. */ @Override public void destroy() { this.pool.removeAllIdleItems(); }
/** * Convert the input to a UUID using the convenience method * {@link #getUUID(Object)}. * * @see org.springframework.core.convert.converter.Converter#convert(java.lang.Object) */ public UUID convert(Object source) { return getUUID(source); }
/** * @see SimplePool#getIdleCount() * @return the idle count. */ public int getIdleCount() { return this.pool.getIdleCount(); }
/** * @param poolSize the new pool size. * @see SimplePool#setPoolSize(int) */ public void setPoolSize(int poolSize) { this.pool.setPoolSize(poolSize); }
public SimpleActiveIdleMessageSourceAdvice(DynamicPeriodicTrigger trigger) { this.trigger = trigger; this.idlePollPeriod = trigger.getDuration(); this.activePollPeriod = trigger.getDuration(); }
public void setConversionService(ConversionService conversionService) { if (conversionService != null) { this.typeConverter.setConversionService(conversionService); } }
/** * @see SimplePool#getPoolSize() * @return the pool size. */ public int getPoolSize() { return this.pool.getPoolSize(); }
/** * * @param taskExecutor the taskExecutor to set */ public void setTaskExecutor(Executor taskExecutor) { if (taskExecutor instanceof CompositeExecutor) { this.taskExecutor = (CompositeExecutor) taskExecutor; } else { this.taskExecutor = new CompositeExecutor(taskExecutor, taskExecutor); } }
/** * @see SimplePool#getActiveCount() * @return the active count. */ public int getActiveCount() { return this.pool.getActiveCount(); }
@Override public Message<?> afterReceive(Message<?> result, MessageSource<?> source) { if (result == null) { this.compoundTrigger.setOverride(this.override); } else { this.compoundTrigger.setOverride(null); } return result; }
@Override public Message<?> afterReceive(Message<?> result, MessageSource<?> source) { if (result == null) { this.trigger.setDuration(this.idlePollPeriod); } else { this.trigger.setDuration(this.activePollPeriod); } return result; }
/** * Create a channel based on the provided {@link MessageGroupQueue}. * @param messageGroupQueue the {@link MessageGroupQueue} to use. * @since 5.0 */ public PriorityChannel(MessageGroupQueue messageGroupQueue) { super(messageGroupQueue); this.upperBound = new UpperBound(0); this.useMessageStore = true; }
/** * Construct a compound trigger with the supplied primary trigger. * @param primary the primary trigger. */ public CompoundTrigger(Trigger primary) { setPrimary(primary); }
@Override public Bar convert(Foo source) { return new Bar(); } });
/** * Set the pool wait timeout if a pool is configured, default unlimited. * @param poolWaitTimeout the timeout. */ public void setPoolWaitTimeout(long poolWaitTimeout) { this.poolWaitTimeout = poolWaitTimeout; if (this.pool != null) { this.pool.setWaitTimeout(poolWaitTimeout); } }
/** * Modify the target session pool size; the actual pool size will adjust up/down * to this size as and when sessions are requested or retrieved. * * @param poolSize The pool size. */ public void setPoolSize(int poolSize) { this.pool.setPoolSize(poolSize); }
@Override public Bar convert(Foo source) { return new Bar(); } });
/** * Sets the limit of how long to wait for a session to become available. * * @param sessionWaitTimeout the session wait timeout. * @throws IllegalStateException if the wait expires prior to a Session becoming available. */ public void setSessionWaitTimeout(long sessionWaitTimeout) { this.pool.setWaitTimeout(sessionWaitTimeout); }