org.idevlab.rjc.sharding
Class ShardImpl<T>

java.lang.Object
  extended by org.idevlab.rjc.sharding.ShardImpl<T>
All Implemented Interfaces:
Shard<T>

public class ShardImpl<T>
extends Object
implements Shard<T>

Author:
Evgeny Dolgov

Constructor Summary
ShardImpl()
           
ShardImpl(String shardId, T node)
           
ShardImpl(String shardId, T node, int weight)
           
 
Method Summary
 T getNode()
          Underlying shard node
 String getShardId()
          Shard id
 int getWeight()
          Shard weight
 void setNode(T node)
           
 void setShardId(String shardId)
           
 void setWeight(int weight)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShardImpl

public ShardImpl()

ShardImpl

public ShardImpl(String shardId,
                 T node)

ShardImpl

public ShardImpl(String shardId,
                 T node,
                 int weight)
Method Detail

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.