Class MonitorConfiguration


  • public class MonitorConfiguration
    extends java.lang.Object
    Encapsulates various configuration settings for a Monitor's query index
    • Field Detail

      • queryUpdateBufferSize

        private int queryUpdateBufferSize
      • purgeFrequency

        private long purgeFrequency
      • purgeFrequencyUnits

        private java.util.concurrent.TimeUnit purgeFrequencyUnits
      • indexPath

        private java.nio.file.Path indexPath
    • Constructor Detail

      • MonitorConfiguration

        public MonitorConfiguration()
    • Method Detail

      • defaultIndexWriterConfig

        private static IndexWriterConfig defaultIndexWriterConfig()
      • buildIndexWriter

        public IndexWriter buildIndexWriter()
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • setQueryDecomposer

        public MonitorConfiguration setQueryDecomposer​(QueryDecomposer queryDecomposer)
        Set the QueryDecomposer to be used by the Monitor
        Parameters:
        queryDecomposer - the QueryDecomposer to be used by the Monitor
        Returns:
        the current configuration
      • getQueryDecomposer

        public QueryDecomposer getQueryDecomposer()
        Returns:
        the QueryDecomposer used by the Monitor
      • setPurgeFrequency

        public MonitorConfiguration setPurgeFrequency​(long frequency,
                                                      java.util.concurrent.TimeUnit units)
        Set the frequency with with the Monitor's querycache will be garbage-collected
        Parameters:
        frequency - the frequency value
        units - the frequency units
        Returns:
        the current configuration
      • getPurgeFrequency

        public long getPurgeFrequency()
        Returns:
        the value of Monitor's querycache garbage-collection frequency
      • getPurgeFrequencyUnits

        public java.util.concurrent.TimeUnit getPurgeFrequencyUnits()
        Returns:
        Get the units of the Monitor's querycache garbage-collection frequency
      • setQueryUpdateBufferSize

        public MonitorConfiguration setQueryUpdateBufferSize​(int size)
        Set how many queries will be buffered in memory before being committed to the queryindex
        Parameters:
        size - how many queries will be buffered in memory before being committed to the queryindex
        Returns:
        the current configuration
      • getQueryUpdateBufferSize

        public int getQueryUpdateBufferSize()
        Returns:
        the size of the queryindex's in-memory buffer