added debug log on TransportManagerFactory

This commit is contained in:
Roberto Cirillo 2021-05-13 16:15:18 +02:00
parent 60b9ebaa93
commit 52a6cf8641
1 changed files with 4 additions and 0 deletions

View File

@ -44,11 +44,15 @@ public class TransportManagerFactory {
if (logger.isDebugEnabled()) {
logger.debug("getOperation(String) - start");
}
if(logger.isDebugEnabled() && (!Objects.isNull(transport)))
logger.debug("transportLayer with "+transport.memoryType+" already instatiated. New memoryType request is "+memoryType);
// if we haven't any transport layer instantiated or the transport layer is istantiated on another memory type (persistent, volatile),
// then a new transport layer is needed
if(Objects.isNull(transport) || (!transport.memoryType.equals(memoryType))) {
logger.info("new transport layer instantiated for "+memoryType+" memory");
return load(backendType, memoryType, dbNames, writeConcern, readConcern);
}else {
logger.debug("new transport layer not instantiated.");
}
return transport;
}