Class NosqlDbFactory

java.lang.Object
com.oracle.nosql.spring.data.NosqlDbFactory

public class NosqlDbFactory extends Object
Factory class for connecting to an Oracle NoSQL Database on premise database or cloud service.
  • Constructor Details

  • Method Details

    • getNosqlClient

      public NoSQLHandle getNosqlClient()
    • createCloudFactory

      public static NosqlDbFactory createCloudFactory(String endpoint, String configFile) throws IOException
      Creates a NosqlDbFactory object for a cloud service configuration.
      Throws:
      IOException
    • createCloudFactory

      public static NosqlDbFactory createCloudFactory(String endpoint, String configFile, String profileName) throws IOException
      Creates a NosqlDbFactory object for a cloud service configuration.
      Throws:
      IOException
    • createCloudSimFactory

      public static NosqlDbFactory createCloudSimFactory(String endpoint)
      Creates a NosqlDbFactory object for a cloud sim configuration.
    • createProxyFactory

      public static NosqlDbFactory createProxyFactory(String endpoint)
      Creates a NosqlDbFactory object for an on-prem server configuration.
    • createProxyFactory

      public static NosqlDbFactory createProxyFactory(String endpoint, String user, char[] password)
      Creates a NosqlDbFactory object for an on-prem server configuration.
    • getQueryCacheCapacity

      public int getQueryCacheCapacity()
      Returns the capacity of the prepared query cache. By default, this is set to Constants.DEFAULT_QUERY_CACHE_CAPACITY.
    • getQueryCacheLifetime

      public int getQueryCacheLifetime()
      Returns the lifetime of the prepared query cache in milliseconds. By default, this is set to Constants.DEFAULT_QUERY_CACHE_LIFETIME_MS.
    • getTableReqTimeout

      public int getTableReqTimeout()
      Returns the table request timeout in milliseconds. By default, this is set to Constants.DEFAULT_TABLE_REQ_TIMEOUT_MS
    • getTableReqPollInterval

      public int getTableReqPollInterval()
      Returns the table request poll interval in milliseconds. By default, this is set to Constants.DEFAULT_TABLE_RED_POLL_INTERVAL_MS
    • getTimestampPrecision

      public int getTimestampPrecision()
      Returns the precision of the Timestamp NoSQL DB type when creating a new table. By default, this is set to Constants.DEFAULT_TIMESTAMP_PRECISION.

      In the context of a CREATE TABLE statement, a precision must be explicitly specified. This restriction is to prevent users from inadvertently creating TIMESTAMP values with precision 9 (which takes more space) when in reality they don't need that high precision.

      See Timestamp documentation for more details.

    • getDefaultStorageGB

      public int getDefaultStorageGB()
      Returns the config value NosqlDbConfig.getDefaultStorageGB().
    • getDefaultCapacityMode

      public NosqlCapacityMode getDefaultCapacityMode()
      Returns the config value NosqlDbConfig.getDefaultCapacityMode().
    • getDefaultReadUnits

      public int getDefaultReadUnits()
      Returns the config value NosqlDbConfig.getDefaultReadUnits().
    • getDefaultWriteUnits

      public int getDefaultWriteUnits()
      Returns the config value NosqlDbConfig.getDefaultWriteUnits().
    • getLibraryVersion

      public static String getLibraryVersion()
      Returns the current version of the NoSQL DB Sprint Data SDK, as a string in an x.y.z format.