Class GraphOptions
The default graph options to use for a DSE cluster.
These options will be used for all graph statements sent to the cluster, unless they have been explicitly overridden at the statement level.
Inheritance
Inherited Members
Namespace: Dse.Graph
Assembly: Dse.dll
Syntax
public class GraphOptions
Constructors
GraphOptions()
Creates a new instance of GraphOptions.
Declaration
public GraphOptions()
Fields
DefaultLanguage
Default value for graph language.
Declaration
public const string DefaultLanguage = "gremlin-groovy"
Field Value
Type | Description |
---|---|
System.String |
DefaultReadTimeout
Default value for read timeout.
Declaration
public const int DefaultReadTimeout = -1
Field Value
Type | Description |
---|---|
System.Int32 |
DefaultSource
Default value for graph source.
Declaration
public const string DefaultSource = "g"
Field Value
Type | Description |
---|---|
System.String |
Properties
Language
Gets the graph language to use in graph queries.
Declaration
public string Language { get; }
Property Value
Type | Description |
---|---|
System.String |
Name
Gets the graph name to use in graph queries.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
ReadConsistencyLevel
Gets the consistency level used for read queries
Declaration
public ConsistencyLevel? ReadConsistencyLevel { get; }
Property Value
Type | Description |
---|---|
System.Nullable<ConsistencyLevel> |
ReadTimeoutMillis
Gets the value that overrides the default per-host read timeout in milliseconds for all graph queries.
Default: Timeout.Infinite
(-1).
Declaration
public int ReadTimeoutMillis { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
See Also
Source
Gets the graph traversal source name in graph queries.
Declaration
public string Source { get; }
Property Value
Type | Description |
---|---|
System.String |
WriteConsistencyLevel
Gets the consistency level used for read queries
Declaration
public ConsistencyLevel? WriteConsistencyLevel { get; }
Property Value
Type | Description |
---|---|
System.Nullable<ConsistencyLevel> |
Methods
SetLanguage(String)
Sets the graph language to use in graph queries. If you don't call this method, it defaults to DefaultLanguage.
Declaration
public GraphOptions SetLanguage(string language)
Parameters
Type | Name | Description |
---|---|---|
System.String | language |
Returns
Type | Description |
---|---|
GraphOptions |
SetName(String)
Sets the graph name to use in graph queries.
Declaration
public GraphOptions SetName(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name |
Returns
Type | Description |
---|---|
GraphOptions |
SetReadConsistencyLevel(ConsistencyLevel)
Sets the consistency level for the read graph queries.
Declaration
public GraphOptions SetReadConsistencyLevel(ConsistencyLevel consistency)
Parameters
Type | Name | Description |
---|---|---|
ConsistencyLevel | consistency | The consistency level to use in read graph queries. |
Returns
Type | Description |
---|---|
GraphOptions |
SetReadTimeoutMillis(Int32)
Sets the default per-host read timeout in milliseconds for all graph queries.
When setting a value of less than or equals to zero (System.Threading.Timeout.Infinite), it will use an infinite timeout.
Declaration
public GraphOptions SetReadTimeoutMillis(int timeout)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | timeout |
Returns
Type | Description |
---|---|
GraphOptions |
SetSource(String)
Sets the graph traversal source name to use in graph queries. If you don't call this method, it defaults to DefaultSource.
Declaration
public GraphOptions SetSource(string source)
Parameters
Type | Name | Description |
---|---|---|
System.String | source |
Returns
Type | Description |
---|---|
GraphOptions |
SetSourceAnalytics()
Sets the graph source to the server-defined analytic traversal source ('a')
Declaration
public GraphOptions SetSourceAnalytics()
Returns
Type | Description |
---|---|
GraphOptions |
SetWriteConsistencyLevel(ConsistencyLevel)
Sets the consistency level for the write graph queries.
Declaration
public GraphOptions SetWriteConsistencyLevel(ConsistencyLevel consistency)
Parameters
Type | Name | Description |
---|---|---|
ConsistencyLevel | consistency | The consistency level to use in write graph queries. |
Returns
Type | Description |
---|---|
GraphOptions |