Class MongoServiceConfiguration


  • public class MongoServiceConfiguration
    extends Object
    Utility class to help dealing with the restheart configuration file.
    Author:
    Andrea Di Cesare <andrea@softinstigate.com>
    • Field Detail

      • CONNECTION_OPTIONS_KEY

        public static final String CONNECTION_OPTIONS_KEY
        undertow connetction options
        See Also:
        Constant Field Values
      • LOGGER

        public static final org.slf4j.Logger LOGGER
    • Constructor Detail

      • MongoServiceConfiguration

        public MongoServiceConfiguration()
        Creates a new instance of Configuration with defaults values.
    • Method Detail

      • convertListToIntArray

        public static int[] convertListToIntArray​(List<Object> integers)
        Parameters:
        integers -
        Returns:
      • getMongoMounts

        public List<Map<String,​Object>> getMongoMounts()
        Returns:
        the mongoMounts
      • isLocalCacheEnabled

        public boolean isLocalCacheEnabled()
        Returns:
        the localCacheEnabled
      • getLocalCacheTtl

        public long getLocalCacheTtl()
        Returns:
        the localCacheTtl
      • getRequestsLimit

        public int getRequestsLimit()
        Returns:
        the requestsLimit
      • getQueryTimeLimit

        public long getQueryTimeLimit()
        Returns:
        the queryTimeLimit
      • getAggregationTimeLimit

        public long getAggregationTimeLimit()
        Returns:
        the aggregationTimeLimit
      • getAggregationCheckOperators

        public boolean getAggregationCheckOperators()
        Returns:
        the aggregationCheckOperators
      • getEagerLinearSliceWidht

        public int getEagerLinearSliceWidht()
        Returns:
        the eagerLinearSliceWidht
      • getEagerLinearSliceDelta

        public int getEagerLinearSliceDelta()
        Returns:
        the eagerLinearSliceDelta
      • getEagerLinearSliceHeights

        public int[] getEagerLinearSliceHeights()
        Returns:
        the eagerLinearSliceHeights
      • getEagerRndSliceMinWidht

        public int getEagerRndSliceMinWidht()
        Returns:
        the eagerRndSliceMinWidht
      • getEagerRndMaxCursors

        public int getEagerRndMaxCursors()
        Returns:
        the eagerRndMaxCursors
      • getEagerPoolSize

        public int getEagerPoolSize()
        Returns:
        the eagerPoolSize
      • getMongoUri

        public com.mongodb.MongoClientURI getMongoUri()
        Returns:
        the mongoUri
      • isSchemaCacheEnabled

        public boolean isSchemaCacheEnabled()
        Returns:
        the schemaCacheEnabled
      • getSchemaCacheTtl

        public long getSchemaCacheTtl()
        Returns:
        the schemaCacheTtl
      • getConnectionOptions

        public Map<String,​Object> getConnectionOptions()
        Returns:
        the connectionOptions
      • getInstanceBaseURL

        public String getInstanceBaseURL()
        Returns:
        the instanceBaseURL
      • getConfigurationFileMap

        public Map<String,​Object> getConfigurationFileMap()
        Returns:
        the configurationFileMap
      • getCursorBatchSize

        public int getCursorBatchSize()
        Returns:
        the cursorBatchSize
      • getMaxPagesize

        public int getMaxPagesize()
        Returns:
        the maxPagesize
      • getDefaultPagesize

        public int getDefaultPagesize()
        Returns:
        the defaultPagesize
      • gatheringAboveOrEqualToLevel

        public boolean gatheringAboveOrEqualToLevel​(MongoServiceConfiguration.METRICS_GATHERING_LEVEL level)
        decides whether metrics are gathered at the given log level or not
        Parameters:
        level - Metrics Gathering Level
        Returns:
        true if gathering Above Or Equal To Level