@NotThreadSafe public class DseSessionBuilder extends com.datastax.oss.driver.api.core.session.SessionBuilder<DseSessionBuilder,DseSession>
Constructor and Description |
---|
DseSessionBuilder() |
Modifier and Type | Method and Description |
---|---|
protected com.datastax.oss.driver.api.core.context.DriverContext |
buildContext(com.datastax.oss.driver.api.core.config.DriverConfigLoader configLoader,
List<com.datastax.oss.driver.api.core.type.codec.TypeCodec<?>> typeCodecs,
com.datastax.oss.driver.api.core.metadata.NodeStateListener nodeStateListener,
com.datastax.oss.driver.api.core.metadata.schema.SchemaChangeListener schemaChangeListener,
com.datastax.oss.driver.api.core.tracker.RequestTracker requestTracker,
Map<String,String> localDatacenters,
Map<String,Predicate<com.datastax.oss.driver.api.core.metadata.Node>> nodeFilters,
ClassLoader classLoader) |
protected com.datastax.oss.driver.api.core.config.DriverConfigLoader |
defaultConfigLoader() |
DseSessionBuilder |
withApplicationName(String applicationName)
The name of the application using the created session.
|
DseSessionBuilder |
withApplicationVersion(String applicationVersion)
The version of the application using the created session.
|
DseSessionBuilder |
withClientId(UUID clientId)
A unique identifier for the created session.
|
protected DseSession |
wrap(com.datastax.oss.driver.api.core.CqlSession defaultSession) |
addContactPoint, addContactPoints, addTypeCodecs, build, buildAsync, buildDefaultSessionAsync, withClassLoader, withConfigLoader, withKeyspace, withKeyspace, withLocalDatacenter, withLocalDatacenter, withNodeFilter, withNodeFilter, withNodeStateListener, withRequestTracker, withSchemaChangeListener
@NonNull public DseSessionBuilder withClientId(@Nullable UUID clientId)
It will be sent in the STARTUP
protocol message for each new connection established
by the driver, and may be used by future DSE versions for monitoring purposes.
If you don't call this method, the driver will generate an identifier with Uuids.random()
.
@NonNull public DseSessionBuilder withApplicationName(@Nullable String applicationName)
It will be sent in the STARTUP
protocol message for each new connection established
by the driver, and may be used by future DSE versions for monitoring purposes.
This can also be defined in the driver configuration with the option basic.application.name
; if you specify both, this method takes precedence and the
configuration option will be ignored.
@NonNull public DseSessionBuilder withApplicationVersion(@Nullable String applicationVersion)
It will be sent in the STARTUP
protocol message for each new connection established
by the driver, and may be used by future DSE versions for monitoring purposes.
This can also be defined in the driver configuration with the option basic.application.version
; if you specify both, this method takes precedence and the
configuration option will be ignored.
protected com.datastax.oss.driver.api.core.context.DriverContext buildContext(com.datastax.oss.driver.api.core.config.DriverConfigLoader configLoader, List<com.datastax.oss.driver.api.core.type.codec.TypeCodec<?>> typeCodecs, com.datastax.oss.driver.api.core.metadata.NodeStateListener nodeStateListener, com.datastax.oss.driver.api.core.metadata.schema.SchemaChangeListener schemaChangeListener, com.datastax.oss.driver.api.core.tracker.RequestTracker requestTracker, Map<String,String> localDatacenters, Map<String,Predicate<com.datastax.oss.driver.api.core.metadata.Node>> nodeFilters, ClassLoader classLoader)
buildContext
in class com.datastax.oss.driver.api.core.session.SessionBuilder<DseSessionBuilder,DseSession>
@NonNull protected com.datastax.oss.driver.api.core.config.DriverConfigLoader defaultConfigLoader()
defaultConfigLoader
in class com.datastax.oss.driver.api.core.session.SessionBuilder<DseSessionBuilder,DseSession>
@NonNull protected DseSession wrap(@NonNull com.datastax.oss.driver.api.core.CqlSession defaultSession)
wrap
in class com.datastax.oss.driver.api.core.session.SessionBuilder<DseSessionBuilder,DseSession>
Copyright © 2017–2019. All rights reserved.