Class CosmosSelfSignedCertificate

java.lang.Object
com.azure.cosmos.implementation.Configs
net.officefloor.nosql.cosmosdb.test.CosmosSelfSignedCertificate

public class CosmosSelfSignedCertificate extends com.azure.cosmos.implementation.Configs
Allows use of self signed certificate for connecting to Cosmos.
Author:
Daniel Sagenschneider
  • Field Summary

    Fields inherited from class com.azure.cosmos.implementation.Configs

    NON_IDEMPOTENT_WRITE_RETRY_POLICY, NON_IDEMPOTENT_WRITE_RETRY_POLICY_VARIABLE, SPECULATION_THRESHOLD, SPECULATION_THRESHOLD_STEP, SPECULATION_TYPE
  • Method Summary

    Modifier and Type
    Method
    Description
    io.netty.handler.ssl.SslContext
     
    static void
    initialise(com.azure.cosmos.CosmosClientBuilder clientBuilder, String certificate)
    Initialises the CosmosClientBuilder.
    static void
    Avoid Open SSL due to Cosmos incompatibilities with Netty.

    Methods inherited from class com.azure.cosmos.implementation.Configs

    getAddressRefreshResponseTimeoutInSeconds, getAggressiveWarmupConcurrency, getBarrierRetryIntervalInMsForMultiRegion, getClientTelemetryEndpoint, getClientTelemetryProxyOptionsConfig, getClientTelemetrySchedulingInSec, getConnectionAcquireTimeout, getCPUCnt, getDelayBetweenReadBarrierCallsInMs, getDirectHttpsMaxConnectionLimit, getEnvironmentName, getGlobalEndpointManagerMaxInitializationTimeInSeconds, getHttpResponseTimeoutInSeconds, getMaxBarrierRetriesForMultiRegion, getMaxHttpBodyLength, getMaxHttpChunkSize, getMaxHttpHeaderSize, getMaxHttpInitialLineLength, getMaxIdleConnectionTimeout, getMaxNumberOfPrimaryReadRetries, getMaxNumberOfReadBarrierReadRetries, getMaxNumberOfReadQuorumRetries, getMaxRetriesInLocalRegionWhenRemoteRegionPreferred, getMaxShortBarrierRetriesForMultiRegion, getMinConnectionPoolSizePerEndpoint, getNonIdempotentWriteRetryPolicy, getOpenConnectionsConcurrency, getProtocol, getQueryPlanResponseTimeoutInSeconds, getReactorNettyConnectionPoolName, getReactorNettyMaxConnectionPoolSize, getSessionTokenMismatchDefaultWaitTimeInMs, getSessionTokenMismatchInitialBackoffTimeInMs, getSessionTokenMismatchMaximumBackoffTimeInMs, getShortBarrierRetryIntervalInMsForMultiRegion, getSpeculationType, getUnavailableLocationsExpirationTimeInSeconds, isEmptyPageDiagnosticsEnabled, isQueryPlanCachingEnabled, isReplicaAddressValidationEnabled, isTcpHealthCheckTimeoutDetectionEnabled, shouldSwitchOffIOThreadForResponse, speculationThreshold, speculationThresholdStep, useLegacyTracing

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • noOpenSsl

      public static void noOpenSsl()
      Avoid Open SSL due to Cosmos incompatibilities with Netty.
    • initialise

      public static void initialise(com.azure.cosmos.CosmosClientBuilder clientBuilder, String certificate) throws Exception
      Initialises the CosmosClientBuilder.
      Parameters:
      clientBuilder - CosmosClientBuilder to initialise.
      certificate - Certificate to Cosmos DB emulator.
      Throws:
      Exception - If fails to create SslContext.
    • getSslContext

      public io.netty.handler.ssl.SslContext getSslContext()
      Overrides:
      getSslContext in class com.azure.cosmos.implementation.Configs