次の 12 のメトリクス (TotalEmail、SentEmail など) を収集したいと考えています。そのために、ローカルメソッド (getValues()) を使用しています。その中で、12 個の Statement オブジェクトと ResultSet オブジェクトを使用しています。正常に動作しています。変数のメモリ使用量を減らす他の方法を教えてください。
getValues() {
private Statement TotalEmail = null;
private Statement SentEmail = null;
private Statement FailEmail = null;
private Statement ActiveUser = null;
private Statement FailLogin = null;
private Statement SentLogin = null;
private Statement TotalBilling = null;
private Statement FailBilling = null;
private Statement SuccessBilling= null;
private Statement TotalSubmission = null;
private Statement FailSubmission = null;
private Statement SuccessSubmission = null;
private ResultSet TotalEmailRS = null;
private ResultSet SentEmailRS = null;
private ResultSet FailEmailRS = null;
private ResultSet ActiveUserRS = null;
private ResultSet FailLoginRS = null;
private ResultSet SentLoginRS = null;
private ResultSet TotalBillingRS = null;
private ResultSet FailBillingRS = null;
private ResultSet SuccessBillingRS = null;
private ResultSet TotalSubmissionRS = null;
private ResultSet FailSubmissionRS = null;
private ResultSet SuccessSubmissionRS = null;
}