|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.nix.ert.keypartition.KeyPartitionManager
TODO Has to check, if this node is responsible for the requested key (by looking at all his key-partitions) and otherwise has to forward the request to the corresponding node
Field Summary | |
protected boolean |
isJoining
|
Method Summary | |
void |
add(KeyPartition keyPartition)
|
DataItem |
calculateMigrationData(double remoteLoad,
boolean uplinkNode)
Calculates the KeyRange to migrate |
void |
delete(DataItem data)
|
void |
get(DataItem data)
|
KeyPartition |
getFirst()
|
static KeyPartitionManager |
getInstance()
|
KeyPartition |
getLast()
|
void |
isFirstNodeOnNetwork()
This method should be only called for the first node in the whole network. |
void |
joinOnNetwork()
|
double |
nodeLoad()
gives back the load of this current node: takes into account the amount of items stored in db and later also CPU load, throughput of requests, ... |
void |
put(DataItem data)
|
void |
register(KeyPartition newKeyPartition)
|
KeyPartition |
responsible(DataItem dataItem)
|
KeyPartition |
responsible(InternalKey internalKey)
|
KeyPartition |
substract(KeyPartition keyPartition)
|
java.lang.String |
toString()
|
void |
unregister(KeyPartition oldKeyPartition)
|
protected void |
updatedbSize(int size)
|
protected void |
updateStatistic()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected boolean isJoining
Method Detail |
public static KeyPartitionManager getInstance()
public void register(KeyPartition newKeyPartition)
public void unregister(KeyPartition oldKeyPartition)
public KeyPartition responsible(DataItem dataItem)
public KeyPartition responsible(InternalKey internalKey)
public KeyPartition substract(KeyPartition keyPartition)
keyPartition
-
public void add(KeyPartition keyPartition)
public KeyPartition getFirst()
public KeyPartition getLast()
public void get(DataItem data)
public void put(DataItem data)
public void delete(DataItem data)
public void isFirstNodeOnNetwork()
public void joinOnNetwork()
public double nodeLoad()
public DataItem calculateMigrationData(double remoteLoad, boolean uplinkNode)
remoteLoad
- the load of the other node, which wants to have some data from
this nodeuplinkNode
- if true, the node who requests the migration is the
uplinkNode, if false it is the downlonkNode
protected void updatedbSize(int size)
protected void updateStatistic()
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |