Class ZKEmoServiceDiscovery
- java.lang.Object
-
- com.google.common.util.concurrent.AbstractService
-
- com.bazaarvoice.emodb.databus.client.discovery.ZKEmoServiceDiscovery
-
- All Implemented Interfaces:
EmoServiceDiscovery,com.google.common.util.concurrent.Service
- Direct Known Subclasses:
PartitionedDiscovery
public abstract class ZKEmoServiceDiscovery extends com.google.common.util.concurrent.AbstractService implements EmoServiceDiscovery
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classZKEmoServiceDiscovery.Builderprotected static classZKEmoServiceDiscovery.Host
-
Constructor Summary
Constructors Modifier Constructor Description protectedZKEmoServiceDiscovery(java.lang.String zookeeperConnectionString, java.lang.String service)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voiddoStart()protected voiddoStop()java.net.URIgetBaseUri()protected abstract java.net.URIgetBaseUriFromDiscovery()protected abstract voidhostsChanged(java.util.List<ZKEmoServiceDiscovery.Host> sortedHosts)
-
-
-
Method Detail
-
doStart
protected void doStart()
- Specified by:
doStartin classcom.google.common.util.concurrent.AbstractService
-
doStop
protected void doStop()
- Specified by:
doStopin classcom.google.common.util.concurrent.AbstractService
-
getBaseUri
public java.net.URI getBaseUri() throws java.net.UnknownHostException- Specified by:
getBaseUriin interfaceEmoServiceDiscovery- Throws:
java.net.UnknownHostException
-
hostsChanged
protected abstract void hostsChanged(java.util.List<ZKEmoServiceDiscovery.Host> sortedHosts)
-
getBaseUriFromDiscovery
protected abstract java.net.URI getBaseUriFromDiscovery()
-
-