-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for more generic resolver #118
base: master
Are you sure you want to change the base?
Conversation
*/ | ||
public MemcacheClientBuilder<V> withSrvResolver(final DnsSrvResolver srvResolver) { | ||
this.srvResolver = checkNotNull(srvResolver, "srvResolver"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I screwed with this one, but this change is no longer needed
client = clients.get(0); | ||
} | ||
} | ||
final SrvKetamaClient client = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this should not be named SrvKetamaClient now
new SrvKetamaClient( | ||
resolver, | ||
DEFAULT_SCHEDULED_EXECUTOR.get(), | ||
dnsRefreshPeriod, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also be renamed
import com.spotify.folsom.ConnectionChangeListener; | ||
import com.spotify.folsom.ObservableClient; | ||
import com.spotify.folsom.RawMemcacheClient; | ||
import com.spotify.folsom.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to use wildcard imports?
for (LookupResult lookupResult : lookupResults) { | ||
hosts.add(HostAndPort.fromParts(lookupResult.host(), lookupResult.port())); | ||
ttl = Math.min(ttl, lookupResult.ttl()); | ||
List<ResolveResult> resolveResults = resolver.resolve(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be final
hosts.add(HostAndPort.fromParts(lookupResult.host(), lookupResult.port())); | ||
ttl = Math.min(ttl, lookupResult.ttl()); | ||
List<ResolveResult> resolveResults = resolver.resolve(); | ||
List<HostAndPort> hosts = Lists.newArrayListWithCapacity(resolveResults.size()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be final
No description provided.