Class UpdateHandler

  • All Implemented Interfaces:
    SolrInfoBean
    Direct Known Subclasses:
    DirectUpdateHandler2

    public abstract class UpdateHandler
    extends Object
    implements SolrInfoBean
    UpdateHandler handles requests to change the index (adds, deletes, commits, optimizes, etc).
    Since:
    solr 0.9
    • Constructor Detail

      • UpdateHandler

        public UpdateHandler​(SolrCore core)
    • Method Detail

      • callPostCommitCallbacks

        protected void callPostCommitCallbacks()
      • callPostSoftCommitCallbacks

        protected void callPostSoftCommitCallbacks()
      • callPostOptimizeCallbacks

        protected void callPostOptimizeCallbacks()
      • newIndexWriter

        public abstract void newIndexWriter​(boolean rollback)
                                     throws IOException
        Called when the Writer should be opened again - eg when replication replaces all of the index files.
        Parameters:
        rollback - IndexWriter if true else close
        Throws:
        IOException - If there is a low-level I/O error.
      • getSolrCoreState

        public abstract SolrCoreState getSolrCoreState()
      • getUpdateLog

        public abstract UpdateLog getUpdateLog()
      • registerCommitCallback

        public void registerCommitCallback​(SolrEventListener listener)
        NOTE: this function is not thread safe. However, it is safe to call within the inform( SolrCore core ) function for SolrCoreAware classes. Outside inform, this could potentially throw a ConcurrentModificationException
        See Also:
        SolrCoreAware
      • registerSoftCommitCallback

        public void registerSoftCommitCallback​(SolrEventListener listener)
        NOTE: this function is not thread safe. However, it is safe to call within the inform( SolrCore core ) function for SolrCoreAware classes. Outside inform, this could potentially throw a ConcurrentModificationException
        See Also:
        SolrCoreAware
      • registerOptimizeCallback

        public void registerOptimizeCallback​(SolrEventListener listener)
        NOTE: this function is not thread safe. However, it is safe to call within the inform( SolrCore core ) function for SolrCoreAware classes. Outside inform, this could potentially throw a ConcurrentModificationException
        See Also:
        SolrCoreAware
      • getMetricNames

        public Set<String> getMetricNames()
        Description copied from interface: SolrInfoBean
        Modifiable set of metric names that this component reports (default is null, which means none). If not null then this set is used by SolrInfoBean.registerMetricName(String) to capture what metrics names are reported from this component.

        NOTE: this set has to allow iteration under modifications.

        Specified by:
        getMetricNames in interface SolrInfoBean
      • getMetricRegistry

        public com.codahale.metrics.MetricRegistry getMetricRegistry()
        Description copied from interface: SolrInfoBean
        An instance of MetricRegistry that this component uses for metrics reporting (default is null, which means no registry).
        Specified by:
        getMetricRegistry in interface SolrInfoBean