INT-3047 SFTP Multiplex Over Single Connection
Enable the use of multiple JSch channels over a single connection. JIRA: https://jira.springsource.org/browse/INT-3047 INT-3047: Polishing locks logic INT-3047 SFTP Reset Cache; Quiesce Shared Sessions Support resetCache() on the CachingSessionFactory - reset a shared JSch session so it is reestablished on next use - immediately close idle sessions - close in-use sessions as they are returned - close the channel when an SftpSession is closed and a shared JSch is being used - physically close a shared JSch session only when the last channel is closed Polishing Forgot to save the ftp.xml. Change CachedSession.epoch to created. INT-3047 Polishing - PR Comments - Also add missing docs for `preserve-timestamp` INT-3047 Polish - PR Comments Also change epoch to nanoseconds and use a simple != comparison with the epoch in which a session was created.
This commit is contained in:
committed by
Artem Bilan
parent
e128c80c19
commit
7bc4fe2d0b
@@ -192,7 +192,7 @@ public class SimplePool<T> implements Pool<T> {
|
||||
}
|
||||
else if (this.callback.isStale(item)) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Received a stale item, will attempt to get a new one.");
|
||||
logger.debug("Received a stale item " + item + ", will attempt to get a new one.");
|
||||
}
|
||||
doRemoveItem(item);
|
||||
item = doGetItem();
|
||||
@@ -241,6 +241,9 @@ public class SimplePool<T> implements Pool<T> {
|
||||
}
|
||||
|
||||
private void doRemoveItem(T item) {
|
||||
if (logger.isDebugEnabled()){
|
||||
logger.debug("Removing " + item + " from the pool");
|
||||
}
|
||||
this.allocated.remove(item);
|
||||
this.inUse.remove(item);
|
||||
this.callback.removedFromPool(item);
|
||||
|
||||
Reference in New Issue
Block a user