Class WritableQueryIndex

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

    class WritableQueryIndex
    extends QueryIndex
    • Field Detail

      • purgeCache

        private volatile java.util.Map<java.lang.String,​QueryCacheEntry> purgeCache
      • purgeLock

        private final java.util.concurrent.locks.ReadWriteLock purgeLock
      • commitLock

        private final java.lang.Object commitLock
      • purgeExecutor

        private final java.util.concurrent.ScheduledExecutorService purgeExecutor
      • queries

        protected volatile java.util.concurrent.ConcurrentMap<java.lang.String,​QueryCacheEntry> queries
      • lastPurged

        protected long lastPurged
      • EMPTY

        private static final BytesRef EMPTY
    • Constructor Detail

      • WritableQueryIndex

        WritableQueryIndex​(MonitorConfiguration configuration,
                           Presearcher presearcher)
                    throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • commit

        public void commit​(java.util.List<MonitorQuery> updates)
                    throws java.io.IOException
        Specified by:
        commit in class QueryIndex
        Throws:
        java.io.IOException
      • commitWithoutNotify

        private void commitWithoutNotify​(java.util.List<MonitorQuery> updates)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • purgeCache

        public void purgeCache()
                        throws java.io.IOException
        Specified by:
        purgeCache in class QueryIndex
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • numDocs

        public int numDocs()
                    throws java.io.IOException
        Specified by:
        numDocs in class QueryIndex
        Throws:
        java.io.IOException
      • deleteQueries

        public void deleteQueries​(java.util.List<java.lang.String> ids)
                           throws java.io.IOException
        Specified by:
        deleteQueries in class QueryIndex
        Throws:
        java.io.IOException
      • clear

        public void clear()
                   throws java.io.IOException
        Specified by:
        clear in class QueryIndex
        Throws:
        java.io.IOException