Package ghidra.features.bsim.query
Class BSimPostgresDBConnectionManager.BSimPostgresDataSource
java.lang.Object
ghidra.features.bsim.query.BSimPostgresDBConnectionManager.BSimPostgresDataSource
- All Implemented Interfaces:
BSimJDBCDataSource
- Enclosing class:
BSimPostgresDBConnectionManager
public static class BSimPostgresDBConnectionManager.BSimPostgresDataSource
extends Object
implements BSimJDBCDataSource
-
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Dispose pooled datasource.boolean
int
Get the number of active connections in the associated connection poolGet DBConnection
object performing any required authentication.int
Get the number of idle connections in the associated connection poolGet the server info that corresponds to this data source.int
hashCode()
void
void
setPassword
(String username, char[] newPassword) Update password onBasicDataSource
for use with future connect attempts.void
setPreferredUserName
(String userName)
-
Method Details
-
getServerInfo
Description copied from interface:BSimJDBCDataSource
Get the server info that corresponds to this data source. It is important to note that the returned instance is normalized for the purpose of caching and may not match the original server info object used to obtain this data source instance.- Specified by:
getServerInfo
in interfaceBSimJDBCDataSource
- Returns:
- server info
-
initializeFrom
-
getUserName
-
setPreferredUserName
-
dispose
public void dispose()Description copied from interface:BSimJDBCDataSource
Dispose pooled datasource.- Specified by:
dispose
in interfaceBSimJDBCDataSource
-
getStatus
- Specified by:
getStatus
in interfaceBSimJDBCDataSource
-
getActiveConnections
public int getActiveConnections()Description copied from interface:BSimJDBCDataSource
Get the number of active connections in the associated connection pool- Specified by:
getActiveConnections
in interfaceBSimJDBCDataSource
- Returns:
- number of active connections
-
getIdleConnections
public int getIdleConnections()Description copied from interface:BSimJDBCDataSource
Get the number of idle connections in the associated connection pool- Specified by:
getIdleConnections
in interfaceBSimJDBCDataSource
- Returns:
- number of idle connections
-
setPassword
Update password onBasicDataSource
for use with future connect attempts. Has no affect if username does not match username on data source.- Parameters:
username
- usernamenewPassword
- updated password
-
getConnection
Description copied from interface:BSimJDBCDataSource
Get DBConnection
object performing any required authentication.- Specified by:
getConnection
in interfaceBSimJDBCDataSource
- Returns:
Connection
object- Throws:
SQLException
- if connection fails
-
getConnectionType
- Specified by:
getConnectionType
in interfaceBSimJDBCDataSource
-
equals
-
hashCode
public int hashCode()
-