ch.nix.ert.keypartition
Class KeyPartition

java.lang.Object
  extended bych.nix.ert.keypartition.KeyPartition

public class KeyPartition
extends java.lang.Object

TODO Edit this text for a better description

Author:
michi

Constructor Summary
KeyPartition()
           
 
Method Summary
 boolean add(KeyGroup newKeyGroup)
           
 void addKeyPartition(KeyPartition keyPartition)
           
protected  void finalize()
           
 KeyGroup getFirstKeyGroup()
           
 int getId()
           
 KeyGroup getLastKeyGroup()
           
 boolean isResponsible(DataItem data)
           
 boolean isResponsible(InternalKey internalKey)
           
 boolean isResponsible(KeyGroup keyGroup)
           
 void publish()
           
 void register(KeyGroup newKeyGroup)
          TODO During register process not all KeyGroups are necessary, only the upper, lower one.
 KeyPartition subtractKeyPartition(KeyPartition keyPartition)
           
 java.lang.String toString()
           
 void unpublish()
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KeyPartition

public KeyPartition()
Method Detail

getId

public int getId()

register

public void register(KeyGroup newKeyGroup)
TODO During register process not all KeyGroups are necessary, only the upper, lower one. We can remove all KeyGroups in between to enhance performance, so we basically don't need any TreeMap for this class, as we only need to hold the upper, lower bound? It could be problematic, if we want to decide, if a special KeyGroup is occupied? (E.g. to replicate it to another node? If we only now the upper, lower KeyGroups, we can't say if a dedicated key-group is contained or if it is just empty)
Also if we need to broadcast for all KeyGroups, that we are responsible for it, could be a bit tricky, if we don't know all key-groups

Parameters:
newKeyGroup -

add

public boolean add(KeyGroup newKeyGroup)

publish

public void publish()

unpublish

public void unpublish()

addKeyPartition

public void addKeyPartition(KeyPartition keyPartition)

subtractKeyPartition

public KeyPartition subtractKeyPartition(KeyPartition keyPartition)
Parameters:
keyPartition -
Returns:
the cutoff part of this KeyPartition, null if nothing could be cut off

isResponsible

public boolean isResponsible(DataItem data)

isResponsible

public boolean isResponsible(KeyGroup keyGroup)

isResponsible

public boolean isResponsible(InternalKey internalKey)

getFirstKeyGroup

public KeyGroup getFirstKeyGroup()

getLastKeyGroup

public KeyGroup getLastKeyGroup()

finalize

protected void finalize()
                 throws java.lang.Throwable
Throws:
java.lang.Throwable

toString

public java.lang.String toString()


Copyright © 2004 Michael Kussmaul - Revision: 183 - Date: 2004-11-16T15:42:13.763853Z