Class MongoServiceConfiguration

java.lang.Object
org.restheart.mongodb.MongoServiceConfiguration

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

    • CONNECTION_OPTIONS_KEY

      public static final String CONNECTION_OPTIONS_KEY
      undertow connection options Seehttp://undertow.io/undertow-docs/undertow-docs-2.0.0/index.html#common-listener-options
      See Also:
    • LOGGER

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

    • MongoServiceConfiguration

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

    • get

      public static MongoServiceConfiguration get()
    • init

      public static MongoServiceConfiguration init(Map<String,Object> confs)
    • init

      public static MongoServiceConfiguration init(Map<String,Object> confs, boolean silent)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • 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
    • getGetCollectionCacheSize

      public int getGetCollectionCacheSize()
      Returns:
      the getCollectionCacheSize
    • getGetCollectionCacheTTL

      public int getGetCollectionCacheTTL()
      Returns:
      the getCollectionCacheTTL
    • getGetCollectionCacheDocs

      public int getGetCollectionCacheDocs()
      Returns:
      the getCollectionCacheDocs
    • getMongoUri

      public com.mongodb.ConnectionString getMongoUri()
      Returns:
      the mongoUri
    • getPluginsArgs

      public Map<String,Map<String,Object>> getPluginsArgs()
      Returns:
      the pluginsArgs
    • isSchemaCacheEnabled

      public boolean isSchemaCacheEnabled()
      Returns:
      the schemaCacheEnabled
    • getSchemaCacheTtl

      public long getSchemaCacheTtl()
      Returns:
      the schemaCacheTtl
    • getDbEtagCheckPolicy

      public ExchangeKeys.ETAG_CHECK_POLICY getDbEtagCheckPolicy()
      Returns:
      the dbEtagCheckPolicy
    • getCollEtagCheckPolicy

      public ExchangeKeys.ETAG_CHECK_POLICY getCollEtagCheckPolicy()
      Returns:
      the collEtagCheckPolicy
    • getDocEtagCheckPolicy

      public ExchangeKeys.ETAG_CHECK_POLICY getDocEtagCheckPolicy()
      Returns:
      the docEtagCheckPolicy
    • getConnectionOptions

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

      public String getInstanceBaseURL()
      Returns:
      the instanceBaseURL
    • getDefaultRepresentationFormat

      public ExchangeKeys.REPRESENTATION_FORMAT getDefaultRepresentationFormat()
      Returns:
      the defaultRepresentationFromat
    • 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
    • getMetricsGatheringLevel

      Deprecated.
      will be removed in RH v8.0
    • gatheringAboveOrEqualToLevel

      @Deprecated public boolean gatheringAboveOrEqualToLevel(MongoServiceConfiguration.METRICS_GATHERING_LEVEL level)
      Deprecated.
      will be removed in RH v8.0 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