public static class CosmosConfiguration.Builder extends Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
CosmosConfiguration |
build()
Builds a cosmos configuration object with the provided settings
|
CosmosConfiguration.Builder |
withConnectionPolicy(ConnectionPolicy connectionPolicy)
The (@link ConnectionPolicy) to be used
|
CosmosConfiguration.Builder |
withConsistencyLevel(ConsistencyLevel desiredConsistencyLevel)
This method accepts the (@link ConsistencyLevel) to be used
|
CosmosConfiguration.Builder |
withKeyOrResourceToken(String keyOrResourceToken)
This method will take either key or resource token and perform authentication
for accessing resource.
|
CosmosConfiguration.Builder |
withPermissions(List<Permission> permissions)
This method will accept the permission list , which contains the
resource tokens needed to access resources.
|
CosmosConfiguration.Builder |
withServiceEndpoint(String serviceEndpoint) |
public CosmosConfiguration.Builder withServiceEndpoint(String serviceEndpoint)
public CosmosConfiguration.Builder withKeyOrResourceToken(String keyOrResourceToken)
keyOrResourceToken - key or resourceToken for authentication .public CosmosConfiguration.Builder withPermissions(List<Permission> permissions)
permissions - Permission list for authentication.public CosmosConfiguration.Builder withConsistencyLevel(ConsistencyLevel desiredConsistencyLevel)
desiredConsistencyLevel - (@link ConsistencyLevel)public CosmosConfiguration.Builder withConnectionPolicy(ConnectionPolicy connectionPolicy)
connectionPolicy - public CosmosConfiguration build()
Copyright © 2019. All rights reserved.