|
52 | 52 | import com.datastax.oss.driver.internal.core.metadata.token.TokenFactoryRegistry; |
53 | 53 | import com.datastax.oss.driver.internal.core.pool.ChannelPoolFactory; |
54 | 54 | import com.datastax.oss.driver.internal.core.protocol.ByteBufPrimitiveCodec; |
| 55 | +import com.datastax.oss.driver.internal.core.servererrors.DefaultWriteTypeRegistry; |
| 56 | +import com.datastax.oss.driver.internal.core.servererrors.WriteTypeRegistry; |
55 | 57 | import com.datastax.oss.driver.internal.core.session.PoolManager; |
56 | 58 | import com.datastax.oss.driver.internal.core.session.RequestProcessorRegistry; |
57 | 59 | import com.datastax.oss.driver.internal.core.ssl.JdkSslHandlerFactory; |
@@ -119,6 +121,8 @@ public class DefaultDriverContext implements InternalDriverContext { |
119 | 121 | private final LazyReference<ConsistencyLevelRegistry> consistencyLevelRegistryRef = |
120 | 122 | new LazyReference<>( |
121 | 123 | "consistencyLevelRegistry", this::buildConsistencyLevelRegistry, cycleDetector); |
| 124 | + private final LazyReference<WriteTypeRegistry> writeTypeRegistryRef = |
| 125 | + new LazyReference<>("writeTypeRegistry", this::buildWriteTypeRegistry, cycleDetector); |
122 | 126 | private final LazyReference<NettyOptions> nettyOptionsRef = |
123 | 127 | new LazyReference<>("nettyOptions", this::buildNettyOptions, cycleDetector); |
124 | 128 | private final LazyReference<WriteCoalescer> writeCoalescerRef = |
@@ -262,6 +266,10 @@ protected ConsistencyLevelRegistry buildConsistencyLevelRegistry() { |
262 | 266 | return new DefaultConsistencyLevelRegistry(); |
263 | 267 | } |
264 | 268 |
|
| 269 | + protected WriteTypeRegistry buildWriteTypeRegistry() { |
| 270 | + return new DefaultWriteTypeRegistry(); |
| 271 | + } |
| 272 | + |
265 | 273 | protected NettyOptions buildNettyOptions() { |
266 | 274 | return new DefaultNettyOptions(this); |
267 | 275 | } |
@@ -419,6 +427,11 @@ public ConsistencyLevelRegistry consistencyLevelRegistry() { |
419 | 427 | return consistencyLevelRegistryRef.get(); |
420 | 428 | } |
421 | 429 |
|
| 430 | + @Override |
| 431 | + public WriteTypeRegistry writeTypeRegistry() { |
| 432 | + return writeTypeRegistryRef.get(); |
| 433 | + } |
| 434 | + |
422 | 435 | @Override |
423 | 436 | public NettyOptions nettyOptions() { |
424 | 437 | return nettyOptionsRef.get(); |
|
0 commit comments