tapestry.repairmonitor
Class PatchworkFaultMsg

java.lang.Object
  |
  +--ostore.network.NetworkMessage
        |
        +--tapestry.repairmonitor.PatchworkFaultMsg
All Implemented Interfaces:
Cloneable, QueueElementIF, QuickSerializable

public class PatchworkFaultMsg
extends NetworkMessage
implements QuickSerializable

This is a message sent out by the FaultInjectionStage to inform a peer to start dropping probe messages.

Version:
$Id: PatchworkFaultMsg.java,v 1.1.1.1 2004/03/26 19:57:08 hweather Exp $
Author:
Jeremy Stribling

Field Summary
 boolean allNodes
           
 boolean isPercent
           
 NodeId nodeToDrop
           
 int value
           
 
Fields inherited from class ostore.network.NetworkMessage
comp_q, est_rtt_ms, inbound, peer, sender, tries, user_data, wait_ms
 
Constructor Summary
PatchworkFaultMsg(InputBuffer buffer)
           
PatchworkFaultMsg(NodeId peer, int value, boolean isPercent)
          Constucts a fault injection message, which will let a peer know that it should begin dropping messages.
PatchworkFaultMsg(NodeId peer, int value, boolean isPercent, boolean allNodes)
          Constucts a fault injection message, which will let a peer know that it should begin dropping messages.
PatchworkFaultMsg(NodeId peer, int value, boolean isPercent, NodeId nodeToDrop)
          Constucts a fault injection message, which will let a peer know that it should begin dropping messages.
 
Method Summary
 Object clone()
           
 void serialize(OutputBuffer buffer)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

isPercent

public boolean isPercent

allNodes

public boolean allNodes

value

public int value

nodeToDrop

public NodeId nodeToDrop
Constructor Detail

PatchworkFaultMsg

public PatchworkFaultMsg(NodeId peer,
                         int value,
                         boolean isPercent)
Constucts a fault injection message, which will let a peer know that it should begin dropping messages. Either an absolute number of messages can be specified, or a percentage of messages for an indefinite amount of time. Note that if a percentage is given, it can be removed by sending another fault injection message with the value at 0. Any arriving fault message overrides the previous one.

Parameters:
peer - the node to contact
value - the amount of messages to drop, either as a number of messages or a percent of messages
isPercent - true if value specifies a percentage

PatchworkFaultMsg

public PatchworkFaultMsg(NodeId peer,
                         int value,
                         boolean isPercent,
                         boolean allNodes)
Constucts a fault injection message, which will let a peer know that it should begin dropping messages. Either an absolute number of messages can be specified, or a percentage of messages for an indefinite amount of time. Note that if a percentage is given, it can be removed by sending another fault injection message with the value at 0. Any arriving fault message overrides the previous one.

Parameters:
peer - the node to contact
value - the amount of messages to drop, either as a number of messages or a percent of messages
isPercent - true if value specifies a percentage
allNodes - true iff this fault is to apply to all nodes probing it

PatchworkFaultMsg

public PatchworkFaultMsg(NodeId peer,
                         int value,
                         boolean isPercent,
                         NodeId nodeToDrop)
Constucts a fault injection message, which will let a peer know that it should begin dropping messages. Either an absolute number of messages can be specified, or a percentage of messages for an indefinite amount of time. Note that if a percentage is given, it can be removed by sending another fault injection message with the value at 0. Any arriving fault message overrides the previous one.

Parameters:
peer - the node to contact
value - the amount of messages to drop, either as a number of messages or a percent of messages
isPercent - true if value specifies a percentage
nodeToDrop - Drop messages from a specific node, instead of sender

PatchworkFaultMsg

public PatchworkFaultMsg(InputBuffer buffer)
                  throws QSException
Method Detail

serialize

public void serialize(OutputBuffer buffer)
Specified by:
serialize in interface QuickSerializable
Overrides:
serialize in class NetworkMessage

clone

public Object clone()
             throws CloneNotSupportedException
Overrides:
clone in class NetworkMessage
CloneNotSupportedException

toString

public String toString()
Overrides:
toString in class NetworkMessage