planet.test.symphonyDHT
Class SymphonyDHTMessage

java.lang.Object
  extended byplanet.test.symphonyDHT.SymphonyDHTMessage
All Implemented Interfaces:
Message, java.io.Serializable

public class SymphonyDHTMessage
extends java.lang.Object
implements Message

Message to be used at ChordDHT main application. It permits two operations:

  1. Insert: Insert a key/value pair.
  2. Lookup: Lookup a key at ring.

Version:
1.0
Author:
Carles Pairot , Jordi Pujol , Marc Sanchez
See Also:
Serialized Form

Field Summary
static int INSERT
          Insert message type to be used at constructor.
static int LOOKUP
          Lookup message type to be used at constructor.
 
Constructor Summary
SymphonyDHTMessage(Id source, int type)
          Builds a new Message with the specified source Node origNode and specified type type
SymphonyDHTMessage(Id source, int type, java.lang.String key, java.lang.String value)
           
SymphonyDHTMessage(Id source, int type, java.lang.String key, java.lang.String value, java.util.Vector MultiValue)
          Builds a new Message with the specified source Node and type, key/value pairs.
SymphonyDHTMessage(Id source, int type, java.lang.String key, java.util.Vector MultiValue)
           
 
Method Summary
 java.lang.String getKey()
           
 Id getSource()
           
 int getType()
           
 java.lang.String getValue()
           
 java.util.Vector getVectorValue()
           
 void setSource(Id source)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INSERT

public static final int INSERT
Insert message type to be used at constructor.

See Also:
Constant Field Values

LOOKUP

public static final int LOOKUP
Lookup message type to be used at constructor.

See Also:
Constant Field Values
Constructor Detail

SymphonyDHTMessage

public SymphonyDHTMessage(Id source,
                          int type)
Builds a new Message with the specified source Node origNode and specified type type

Parameters:
source - The source node where a remote or local application launched an INSERT/LOOKUP operation.
type - Type of DHT operation: INSERT/LOOKUP.

SymphonyDHTMessage

public SymphonyDHTMessage(Id source,
                          int type,
                          java.lang.String key,
                          java.lang.String value,
                          java.util.Vector MultiValue)
Builds a new Message with the specified source Node and type, key/value pairs.

Parameters:
source - The source node where a remote or local application launched an INSERT/LOOKUP operation.
type - Type of DHT operation: INSERT/LOOKUP
key - Key of the pair.
value - Value of the pair.
MultiValue - List of hash collision for the same key stored on the same node's DHT repository.

SymphonyDHTMessage

public SymphonyDHTMessage(Id source,
                          int type,
                          java.lang.String key,
                          java.lang.String value)

SymphonyDHTMessage

public SymphonyDHTMessage(Id source,
                          int type,
                          java.lang.String key,
                          java.util.Vector MultiValue)
Method Detail

getSource

public Id getSource()

setSource

public void setSource(Id source)

getType

public int getType()

getKey

public java.lang.String getKey()

getValue

public java.lang.String getValue()

getVectorValue

public java.util.Vector getVectorValue()

toString

public java.lang.String toString()