public class WriterFailoverResult extends Object
Constructor and Description |
---|
WriterFailoverResult(boolean isConnected,
boolean isNewHost,
List<HostInfo> topology,
@Nullable BaseConnection newConnection)
Constructor for WriterFailoverResult
|
Modifier and Type | Method and Description |
---|---|
@Nullable BaseConnection |
getNewConnection()
Get new connection to a host.
|
List<HostInfo> |
getTopology()
Get latest topology.
|
boolean |
isConnected()
Checks if process result is successful and new connection to host is established.
|
boolean |
isNewHost()
Checks if process successfully connected to a new host.
|
public WriterFailoverResult(boolean isConnected, boolean isNewHost, List<HostInfo> topology, @Nullable BaseConnection newConnection)
isConnected
- True if writer failover was successful and is now connected to a hostisNewHost
- True if failover resulted in connecting to a new hosttopology
- The Topolgoy containing information about the available hostsnewConnection
- The current Connection
object. This is null if there isn't a current connection
and failover failed.public boolean isConnected()
public boolean isNewHost()
public List<HostInfo> getTopology()
public @Nullable BaseConnection getNewConnection()
Connection
New connection to a host. Returns null if no connection is
established.Copyright © 1997-2021 PostgreSQL Global Development Group. All Rights Reserved.