Class DBReadReplica


  • public class DBReadReplica
    extends Object
    • Constructor Detail

      • DBReadReplica

        public DBReadReplica()
    • Method Detail

      • prepareNormalReadReplicaStatement

        public static PreparedStatement prepareNormalReadReplicaStatement​(String sql,
                                                                          int resultSetType,
                                                                          int resultSetConcurrency,
                                                                          String trxName)
        Prepare Normal Read Replica Statement
        Parameters:
        sql - sql statement
        resultSetType - - ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.TYPE_SCROLL_SENSITIVE
        resultSetConcurrency - - ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
        trxName - transaction
        Returns:
        Prepared Statement (from replica if possible, otherwise null)
      • closeReadReplicaStatement

        public static void closeReadReplicaStatement​(Statement st)
      • getConnectionRO

        public static Connection getConnectionRO()