Class ServerInfo
- java.lang.Object
-
- io.debezium.connector.postgresql.connection.ServerInfo
-
public class ServerInfo extends Object
Information about a running Postgres instance.- Author:
- Horia Chiorean (hchiorea@redhat.com)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classServerInfo.ReplicaIdentityTable REPLICA IDENTITY information.protected static classServerInfo.ReplicationSlotInformation about a server replication slot
-
Constructor Summary
Constructors Modifier Constructor Description protectedServerInfo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ServerInfoaddRole(String roleName, String permissions)Stringdatabase()Returns the name of a database for which a connection was establishedMap<String,String>permissionsByRoleName()Returns information about the role names and permissions of the current userStringserver()Returns information about the server machineStringtoString()Stringusername()Returns the name of the user of a connectionprotected ServerInfowithDatabase(String database)protected ServerInfowithServer(String server)protected ServerInfowithUsername(String username)
-
-
-
Method Detail
-
withServer
protected ServerInfo withServer(String server)
-
withUsername
protected ServerInfo withUsername(String username)
-
withDatabase
protected ServerInfo withDatabase(String database)
-
addRole
protected ServerInfo addRole(String roleName, String permissions)
-
server
public String server()
Returns information about the server machine- Returns:
- a String, possibly null if info was not available
-
username
public String username()
Returns the name of the user of a connection- Returns:
- a String, possibly null if info was not available
-
database
public String database()
Returns the name of a database for which a connection was established- Returns:
- a String, possibly null if info was not available
-
permissionsByRoleName
public Map<String,String> permissionsByRoleName()
Returns information about the role names and permissions of the current user- Returns:
- a
Mapof role information, keyed by role name; never null but possibly empty
-
-