diff options
author | Endi Sukma Dewata <edewata@redhat.com> | 2012-03-06 20:06:44 -0600 |
---|---|---|
committer | Endi Sukma Dewata <edewata@redhat.com> | 2012-03-12 09:39:35 -0500 |
commit | c0b210a15ef43873b52c1c9fbec73eba48155b4b (patch) | |
tree | d3db97853a7c00f3f255f726434e73009543ed69 /pki/base/ca/src/com/netscape/ca | |
parent | 34f141c1144dac37248cf404835248413218627e (diff) | |
download | pki-c0b210a15ef43873b52c1c9fbec73eba48155b4b.tar.gz pki-c0b210a15ef43873b52c1c9fbec73eba48155b4b.tar.xz pki-c0b210a15ef43873b52c1c9fbec73eba48155b4b.zip |
Replaced daemon threads with executor service.
The certificate status update and retrieving modifications tasks
have been modified to use the executor service. Unlike daemon
threads, the service will allow existing task to exit gracefully
before shutting down. An abandon operation is used terminate the
persistent search used for retrieving modifications. Some methods
have been moved to CertificateRepository class to simplify
synchronizations.
Ticket #73
Diffstat (limited to 'pki/base/ca/src/com/netscape/ca')
-rw-r--r-- | pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java b/pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java index 1c89a29c8..3de6128b6 100644 --- a/pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java +++ b/pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java @@ -62,8 +62,6 @@ import com.netscape.certsrv.common.NameValuePair; import com.netscape.certsrv.common.NameValuePairs; import com.netscape.certsrv.dbs.EDBNotAvailException; import com.netscape.certsrv.dbs.IElementProcessor; -import com.netscape.certsrv.dbs.certdb.ICertRecord; -import com.netscape.certsrv.dbs.certdb.ICertRecordList; import com.netscape.certsrv.dbs.certdb.ICertificateRepository; import com.netscape.certsrv.dbs.certdb.IRevocationInfo; import com.netscape.certsrv.dbs.crldb.ICRLIssuingPointRecord; @@ -1863,26 +1861,7 @@ public class CRLIssuingPoint implements ICRLIssuingPoint, Runnable { */ public void processRevokedCerts(IElementProcessor p) throws EBaseException { - CertRecProcessor cp = (CertRecProcessor) p; - String filter = getFilter(); - - // NOTE: dangerous cast. - // correct way would be to modify interface and add - // accessor but we don't want to touch the interface - CertificateRepository cr = (CertificateRepository) mCertRepository; - - synchronized (cr.mCertStatusUpdateThread) { - CMS.debug("Starting processRevokedCerts (entered lock)"); - ICertRecordList list = mCertRepository.findCertRecordsInList(filter, - new String[] { ICertRecord.ATTR_ID, ICertRecord.ATTR_REVO_INFO, "objectclass" }, - "serialno", - mPageSize); - - int totalSize = list.getSize(); - - list.processCertRecords(0, totalSize - 1, cp); - CMS.debug("processRevokedCerts done"); - } + mCertRepository.processRevokedCerts(p, getFilter(), mPageSize); } /** |