Class PartitionedDiscovery
- java.lang.Object
-
- com.google.common.util.concurrent.AbstractService
-
- com.bazaarvoice.emodb.databus.client.discovery.ZKEmoServiceDiscovery
-
- com.bazaarvoice.emodb.databus.client.discovery.PartitionedDiscovery
-
- All Implemented Interfaces:
EmoServiceDiscovery,com.google.common.util.concurrent.Service
public class PartitionedDiscovery extends ZKEmoServiceDiscovery
Service discovery implementation which directs requests to a spectific host based on a partition key. The algorithm comes directly from EmoDB and Zookeeper.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPartitionedDiscovery.Builder-
Nested classes/interfaces inherited from class com.bazaarvoice.emodb.databus.client.discovery.ZKEmoServiceDiscovery
ZKEmoServiceDiscovery.Host
-
-
Constructor Summary
Constructors Constructor Description PartitionedDiscovery(java.lang.String zookeeperConnectionString, java.lang.String service, java.lang.String partitionKey)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.net.URIgetBaseUriFromDiscovery()protected voidhostsChanged(java.util.List<ZKEmoServiceDiscovery.Host> sortedHosts)-
Methods inherited from class com.bazaarvoice.emodb.databus.client.discovery.ZKEmoServiceDiscovery
doStart, doStop, getBaseUri
-
-
-
-
Method Detail
-
hostsChanged
protected void hostsChanged(java.util.List<ZKEmoServiceDiscovery.Host> sortedHosts)
- Specified by:
hostsChangedin classZKEmoServiceDiscovery
-
getBaseUriFromDiscovery
protected java.net.URI getBaseUriFromDiscovery()
- Specified by:
getBaseUriFromDiscoveryin classZKEmoServiceDiscovery
-
-