org.idevlab.rjc.sharding
Class ShardImpl<T>
java.lang.Object
org.idevlab.rjc.sharding.ShardImpl<T>
- All Implemented Interfaces:
- Shard<T>
public class ShardImpl<T>
- extends Object
- implements Shard<T>
- Author:
- Evgeny Dolgov
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShardImpl
public ShardImpl()
ShardImpl
public ShardImpl(String shardId,
T node)
ShardImpl
public ShardImpl(String shardId,
T node,
int weight)
getWeight
public int getWeight()
- Description copied from interface:
Shard
- Shard weight
- Specified by:
getWeight in interface Shard<T>
- Returns:
- Shard weight
setWeight
public void setWeight(int weight)
getShardId
public String getShardId()
- Description copied from interface:
Shard
- Shard id
- Specified by:
getShardId in interface Shard<T>
- Returns:
- shard id, must not be null
setShardId
public void setShardId(String shardId)
getNode
public T getNode()
- Description copied from interface:
Shard
- Underlying shard node
- Specified by:
getNode in interface Shard<T>
- Returns:
- shard node
setNode
public void setNode(T node)
Copyright © 2011. All Rights Reserved.