Package org.compiere.util
Class DBReadReplica
- java.lang.Object
-
- org.compiere.util.DBReadReplica
-
public class DBReadReplica extends Object
-
-
Constructor Summary
Constructors Constructor Description DBReadReplica()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
closeReadReplicaStatement(Statement st)
static Connection
getConnectionRO()
static PreparedStatement
prepareNormalReadReplicaStatement(String sql, int resultSetType, int resultSetConcurrency, String trxName)
Prepare Normal Read Replica Statement
-
-
-
Method Detail
-
prepareNormalReadReplicaStatement
public static PreparedStatement prepareNormalReadReplicaStatement(String sql, int resultSetType, int resultSetConcurrency, String trxName)
Prepare Normal Read Replica Statement- Parameters:
sql
- sql statementresultSetType
- - ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.TYPE_SCROLL_SENSITIVEresultSetConcurrency
- - ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLEtrxName
- transaction- Returns:
- Prepared Statement (from replica if possible, otherwise null)
-
closeReadReplicaStatement
public static void closeReadReplicaStatement(Statement st)
-
getConnectionRO
public static Connection getConnectionRO()
-
-