nl: creates a org.apache.drill.jdbc.nonclosableconnection connection and caches it.the returned org.apache.drill.jdbc.nonclosableconnection connection does not support java.sql.connection #close . consumer must call #close to close the cached connections . concode_field_sep ConnectionFactory delegate concode_elem_sep Logger logger concode_elem_sep Map<ConnectionInfo,Connection> cache concode_field_sep void closeConnections
code: Connection function ( ConnectionInfo arg0 ) { Connection loc0 = cache . get ( arg0 ) ; if ( loc0 == null ) { loc0 = delegate . getConnection ( arg0 ) ; cache . put ( arg0 , loc0 ) ; } return new NonClosableConnection ( loc0 ) ; }