This is the method to override/implement to create your own Service.
This is the method to override/implement to create your own Service.
Determines whether this Service
is available (can accept requests
with a reasonable likelihood of success).
Determines whether this Service
is available (can accept requests
with a reasonable likelihood of success).
The current availability Status of this Service
.
The current availability Status of this Service
.
ShardingService takes a
Distributor
where the handle is a service. It uses the distributor to distribute requests *only* when the hash function returns Some[Long]. If None is returned, it throwsNotShardableException
. If the underlying service for a particular shard is not available,NotServableException
is thrown. Example: val serviceFactory = KetamaShardingServiceBuilder() .nodes(services) // services is of type Seq[(String, Service[Req,Rep])] .withHash { req => Some(hashCodeOfSomething)} .buildFactory() val service = serviceFactory() service(req) // where req is a Req and may have ShardableRequest mixed in