@NotThreadSafe public final class DeterministicHashPolicy extends Object implements BlockLocationPolicy
BlockLocationPolicy.Factory
Constructor and Description |
---|
DeterministicHashPolicy()
Constructs a new
DeterministicHashPolicy . |
DeterministicHashPolicy(Integer numShards)
Constructs a new
DeterministicHashPolicy . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
WorkerNetAddress |
getWorker(GetWorkerOptions options)
Gets the worker's network address for serving operations requested for the block.
|
int |
hashCode() |
String |
toString() |
public DeterministicHashPolicy()
DeterministicHashPolicy
.public DeterministicHashPolicy(Integer numShards)
DeterministicHashPolicy
.numShards
- the number of shards a block's traffic can be sharded topublic WorkerNetAddress getWorker(GetWorkerOptions options)
BlockLocationPolicy
getWorker
in interface BlockLocationPolicy
options
- the options to get a block worker network address for a blockCopyright © 2023. All Rights Reserved.