slicing
Class Slicing

java.lang.Object
  extended by slicing.Slicing
All Implemented Interfaces:
java.lang.Cloneable, peersim.core.Protocol, peersim.extras.am.epidemic.EpidemicProtocol, peersim.extras.am.id.IDHolder

public class Slicing
extends java.lang.Object
implements peersim.extras.am.id.IDHolder, peersim.extras.am.epidemic.EpidemicProtocol


Parameter Summary
tabu
          Tabu list size.
window
          Tabu list size.
 
Field Summary
protected  peersim.core.Node[] tabu
          Tabu list
protected  int tpos
          Current "writing" position in the tabu
 
Constructor Summary
Slicing(slicing.Slicing.ProtocolData p)
           
Slicing(java.lang.String prefix)
           
 
Method Summary
 java.lang.Object clone()
           
 long getID()
           
 float getValue()
           
 void merge(peersim.core.Node lnode, peersim.core.Node rnode, peersim.extras.am.epidemic.Message m)
           
 peersim.extras.am.epidemic.Message prepareRequest(peersim.core.Node lnode, peersim.core.Node rnode)
           
 peersim.extras.am.epidemic.Message prepareResponse(peersim.core.Node lnode, peersim.core.Node rnode, peersim.extras.am.epidemic.Message request)
           
 peersim.core.Node selectPeer(peersim.core.Node lnode)
           
 void setID(long id)
           
 void setValue(float val)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Parameter Detail

tabu

Tabu list size. The tabu list is used when selecting a node, to avoid to visit too early a node that has been visited recently.


window

Tabu list size. The tabu list is used when selecting a node, to avoid to visit too early a node that has been visited recently.

Field Detail

tabu

protected peersim.core.Node[] tabu
Tabu list


tpos

protected int tpos
Current "writing" position in the tabu

Constructor Detail

Slicing

public Slicing(java.lang.String prefix)

Slicing

public Slicing(slicing.Slicing.ProtocolData p)
Method Detail

clone

public java.lang.Object clone()
Specified by:
clone in interface peersim.core.Protocol
Overrides:
clone in class java.lang.Object

merge

public void merge(peersim.core.Node lnode,
                  peersim.core.Node rnode,
                  peersim.extras.am.epidemic.Message m)
Specified by:
merge in interface peersim.extras.am.epidemic.EpidemicProtocol

prepareRequest

public peersim.extras.am.epidemic.Message prepareRequest(peersim.core.Node lnode,
                                                         peersim.core.Node rnode)
Specified by:
prepareRequest in interface peersim.extras.am.epidemic.EpidemicProtocol

prepareResponse

public peersim.extras.am.epidemic.Message prepareResponse(peersim.core.Node lnode,
                                                          peersim.core.Node rnode,
                                                          peersim.extras.am.epidemic.Message request)
Specified by:
prepareResponse in interface peersim.extras.am.epidemic.EpidemicProtocol

selectPeer

public peersim.core.Node selectPeer(peersim.core.Node lnode)
Specified by:
selectPeer in interface peersim.extras.am.epidemic.EpidemicProtocol

getValue

public float getValue()

setValue

public void setValue(float val)

getID

public long getID()
Specified by:
getID in interface peersim.extras.am.id.IDHolder

setID

public void setID(long id)
Specified by:
setID in interface peersim.extras.am.id.IDHolder