Project

General

Profile

« Previous | Next » 

Revision 8344

Added by Jing Tao over 10 years ago

made the delete method synchronized.

View differences:

metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/SolrIndex.java
589 589
        //httpService.sendUpdate(solrIndexUri, addCommand);
590 590
    }
591 591

  
592
    /*
593
     * Remove a pid which is part of resource map.
594
     */
592 595
    private void removeFromDataPackage(String pid) throws XPathExpressionException, NotImplemented, NotFound, UnsupportedType, SolrServerException, IOException, ParserConfigurationException, SAXException  {
593 596
        SolrDoc indexedDoc = ResourceMapSubprocessor.getSolrDoc(pid);
594 597
        removeFromIndex(pid);
......
619 622
    /*
620 623
     * Remove a pid from the solr index
621 624
     */
622
    private void removeFromIndex(String pid) throws SolrServerException, IOException {
625
    private synchronized void removeFromIndex(String pid) throws SolrServerException, IOException {
623 626
        if(pid != null && !pid.trim().equals("")) {
624 627
            /*IndexEvent event = new IndexEvent();
625 628
            event.setDate(Calendar.getInstance().getTime());

Also available in: Unified diff