org.planx.xmlstore.routing.operation
Class HashReceiver

java.lang.Object
  extended by org.planx.xmlstore.routing.operation.OriginReceiver
      extended by org.planx.xmlstore.routing.operation.HashReceiver
All Implemented Interfaces:
Receiver

public class HashReceiver
extends OriginReceiver

Receives a HashMessage and compares it to hashes generated locally. Any hash for an interval not matching will result in a StoreRequestMessage for that interval.


Field Summary
 
Fields inherited from class org.planx.xmlstore.routing.operation.OriginReceiver
local, server, space
 
Constructor Summary
HashReceiver(MessageServer server, Node local, Space space, Map localMap)
           
 
Method Summary
 void receive(Message incoming, int comm)
          Updates the local space by inserting the origin node.
 
Methods inherited from class org.planx.xmlstore.routing.operation.OriginReceiver
timeout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HashReceiver

public HashReceiver(MessageServer server,
                    Node local,
                    Space space,
                    Map localMap)
Method Detail

receive

public void receive(Message incoming,
                    int comm)
             throws IOException,
                    UnknownMessageException
Description copied from class: OriginReceiver
Updates the local space by inserting the origin node. Note that if the node already exists in the local space, it's time last seen is updated instead.

Specified by:
receive in interface Receiver
Overrides:
receive in class OriginReceiver
Throws:
IOException - if an I/O error occurs
UnknownMessageException - if the message or comm was unexpected


Copyright © 2010. All Rights Reserved.