org.hibernate.shards.strategy.selection
Class LoadBalancedShardSelectionStrategy
java.lang.Object
org.hibernate.shards.strategy.selection.LoadBalancedShardSelectionStrategy
- All Implemented Interfaces:
- ShardSelectionStrategy
public class LoadBalancedShardSelectionStrategy
- extends Object
- implements ShardSelectionStrategy
- Author:
- maxr@google.com (Max Ross)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LoadBalancedShardSelectionStrategy
public LoadBalancedShardSelectionStrategy(ShardLoadBalancer shardLoadBalancer)
selectShardIdForNewObject
public ShardId selectShardIdForNewObject(Object obj)
- Description copied from interface:
ShardSelectionStrategy
- Determine the specific shard on which this object should reside
- Specified by:
selectShardIdForNewObject in interface ShardSelectionStrategy
- Parameters:
obj - the new object for which we are selecting a shard
- Returns:
- the id of the shard on which this object should live