X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fauth-batch%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Fbatch%2Fupdate%2FRemove.java;h=7b98a2f070e44e52df71d6337935c2186253b74d;hb=d86e3224e6a5af2bd2b713f93bea5e6677d3ebc2;hp=7a30dc5fd1319f9a0c647d766f39019ca31e5bc1;hpb=a50007dcded86acc2dcd610810f8afac720a058a;p=aaf%2Fauthz.git diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/update/Remove.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/update/Remove.java index 7a30dc5f..7b98a2f0 100644 --- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/update/Remove.java +++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/update/Remove.java @@ -36,6 +36,7 @@ import org.onap.aaf.auth.batch.helpers.CQLBatch; import org.onap.aaf.auth.batch.helpers.CQLBatchLoop; import org.onap.aaf.auth.batch.helpers.Cred; import org.onap.aaf.auth.batch.helpers.Future; +import org.onap.aaf.auth.batch.helpers.LastNotified; import org.onap.aaf.auth.batch.helpers.UserRole; import org.onap.aaf.auth.batch.helpers.X509; import org.onap.aaf.auth.dao.CassAccess; @@ -51,6 +52,7 @@ import org.onap.aaf.cadi.util.CSV; import org.onap.aaf.misc.env.APIException; import org.onap.aaf.misc.env.Env; import org.onap.aaf.misc.env.TimeTaken; +import org.onap.aaf.misc.env.Trans; import org.onap.aaf.misc.env.util.Chrono; public class Remove extends Batch { @@ -74,7 +76,7 @@ public class Remove extends Batch { } finally { tt2.done(); } - cqlBatch = new CQLBatch(noAvg.info(),session); + cqlBatch = new CQLBatch(noAvg.debug(),session); } finally { @@ -174,6 +176,9 @@ public class Remove extends Batch { // Not cached Approval.deleteByIDBatch(cbl.inc(),row.get(1)); break; + case "notified": + LastNotified.delete(cbl.inc(),row); + break; } }); cbl.flush(); @@ -185,14 +190,19 @@ public class Remove extends Batch { } } } finally { - if(ur.get()) { - cqlBatch.touch(UserRoleDAO.TABLE, 0, UserRoleDAO.CACHE_SEG, dryRun); - } - if(cred.get()) { - cqlBatch.touch(CredDAO.TABLE, 0, CredDAO.CACHE_SEG, dryRun); - } - if(x509.get()) { - cqlBatch.touch(CertDAO.TABLE, 0, CertDAO.CACHE_SEG, dryRun); + TimeTaken tt = trans.start("Touch UR,Cred and Cert Caches",Trans.REMOTE); + try { + if(ur.get()) { + cqlBatch.touch(UserRoleDAO.TABLE, 0, UserRoleDAO.CACHE_SEG, dryRun); + } + if(cred.get()) { + cqlBatch.touch(CredDAO.TABLE, 0, CredDAO.CACHE_SEG, dryRun); + } + if(x509.get()) { + cqlBatch.touch(CertDAO.TABLE, 0, CertDAO.CACHE_SEG, dryRun); + } + } finally { + tt.done(); } } }