Class QueryIndex

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    class QueryIndex
    extends java.lang.Object
    implements java.io.Closeable
    • Method Detail

      • commit

        void commit​(java.util.List<MonitorQuery> updates)
             throws java.io.IOException
        Throws:
        java.io.IOException
      • getQuery

        MonitorQuery getQuery​(java.lang.String queryId)
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • purgeCache

        void purgeCache()
                 throws java.io.IOException
        Throws:
        java.io.IOException
      • purgeCache

        private void purgeCache​(QueryIndex.CachePopulator populator)
                         throws java.io.IOException
        Remove unused queries from the query cache.

        This is normally called from a background thread at a rate set by configurePurgeFrequency().

        Throws:
        java.io.IOException - on IO errors
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException
      • numDocs

        int numDocs()
      • cacheSize

        int cacheSize()
      • deleteQueries

        void deleteQueries​(java.lang.Iterable<java.lang.String> ids)
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • clear

        void clear()
            throws java.io.IOException
        Throws:
        java.io.IOException