Skip to content

Instantly share code, notes, and snippets.

@ae6rt
Created September 19, 2014 16:08
Show Gist options
  • Save ae6rt/5a9b5e34c242a8e982db to your computer and use it in GitHub Desktop.
Save ae6rt/5a9b5e34c242a8e982db to your computer and use it in GitHub Desktop.
Give us your interfaces
In org.apache.curator.x.discovery.ServiceInstanceBuilder
private static final AtomicReference<LocalIpFilter> localIpFilter = new AtomicReference<LocalIpFilter>
(
new LocalIpFilter()
{
@Override
public boolean use(NetworkInterface nif, InetAddress adr) throws SocketException
{
return (adr != null) && !adr.isLoopbackAddress() && (nif.isPointToPoint() || !adr.isLinkLocalAddress());
}
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment