Skip to content

Commit

Permalink
Rename fields in DefaultDriverContext
Browse files Browse the repository at this point in the history
  • Loading branch information
olim7t committed Apr 4, 2017
1 parent 17c7ab6 commit 9d3e501
Showing 1 changed file with 14 additions and 15 deletions.
Expand Up @@ -29,7 +29,6 @@
import com.datastax.oss.protocol.internal.FrameCodec;
import com.typesafe.config.ConfigFactory;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufAllocator;

/**
* Default implementation of the driver context.
Expand All @@ -39,19 +38,19 @@
*/
public class DefaultDriverContext implements DriverContext {

private final LazyReference<DriverConfig> config =
private final LazyReference<DriverConfig> configRef =
new LazyReference<>("config", this::buildDriverConfig);
private final LazyReference<Compressor<ByteBuf>> compressor =
private final LazyReference<Compressor<ByteBuf>> compressorRef =
new LazyReference<>("compressor", this::buildCompressor);
private final LazyReference<FrameCodec<ByteBuf>> frameCodec =
private final LazyReference<FrameCodec<ByteBuf>> frameCodecRef =
new LazyReference<>("frameCodec", this::buildFrameCodec);
private final LazyReference<ProtocolVersionRegistry> protocolVersionRegistry =
private final LazyReference<ProtocolVersionRegistry> protocolVersionRegistryRef =
new LazyReference<>("protocolVersionRegistry", this::buildProtocolVersionRegistry);
private final LazyReference<NettyOptions> nettyOptions =
private final LazyReference<NettyOptions> nettyOptionsRef =
new LazyReference<>("nettyOptions", this::buildNettyOptions);
private final LazyReference<AuthProvider> authProvider =
private final LazyReference<AuthProvider> authProviderRef =
new LazyReference<>("authProvider", this::buildAuthProvider);
private final LazyReference<WriteCoalescer> writeCoalescer =
private final LazyReference<WriteCoalescer> writeCoalescerRef =
new LazyReference<>("writeCoalescer", this::buildWriteCoalescer);

private DriverConfig buildDriverConfig() {
Expand Down Expand Up @@ -95,36 +94,36 @@ private WriteCoalescer buildWriteCoalescer() {

@Override
public DriverConfig config() {
return config.get();
return configRef.get();
}

@Override
public Compressor<ByteBuf> compressor() {
return compressor.get();
return compressorRef.get();
}

@Override
public FrameCodec<ByteBuf> frameCodec() {
return frameCodec.get();
return frameCodecRef.get();
}

@Override
public ProtocolVersionRegistry protocolVersionRegistry() {
return protocolVersionRegistry.get();
return protocolVersionRegistryRef.get();
}

@Override
public NettyOptions nettyOptions() {
return nettyOptions.get();
return nettyOptionsRef.get();
}

@Override
public AuthProvider authProvider() {
return authProvider.get();
return authProviderRef.get();
}

@Override
public WriteCoalescer writeCoalescer() {
return writeCoalescer.get();
return writeCoalescerRef.get();
}
}

0 comments on commit 9d3e501

Please sign in to comment.