ostore.network.patchwork
Class InjectFaultMsg
java.lang.Object
|
+--ostore.network.NetworkMessage
|
+--ostore.network.patchwork.InjectFaultMsg
- All Implemented Interfaces:
- Cloneable, QueueElementIF, QuickSerializable
- public class InjectFaultMsg
- extends NetworkMessage
- implements QuickSerializable
Injects faults into Patchwork, either of a specific link or an overall node
failure.
- Version:
- $Id: InjectFaultMsg.java,v 1.1 2003/02/08 00:49:37 strib Exp $
- Author:
- Jeremy Stribling
Constructor Summary |
InjectFaultMsg(InputBuffer buffer)
|
InjectFaultMsg(NodeId peer,
int value,
boolean isPercent)
Constucts a fault injection message, which will let a peer
know that it should begin dropping messages. |
InjectFaultMsg(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. |
InjectFaultMsg(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. |
isPercent
public boolean isPercent
allNodes
public boolean allNodes
value
public int value
nodeToDrop
public NodeId nodeToDrop
InjectFaultMsg
public InjectFaultMsg(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 contactvalue
- the amount of messages to drop, either as a
number of messages or a percent of messagesisPercent
- true if value
specifies a percentage
InjectFaultMsg
public InjectFaultMsg(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 contactvalue
- the amount of messages to drop, either as a
number of messages or a percent of messagesisPercent
- true if value
specifies a percentageboolean
- true iff this fault is to apply to all nodes probing it
InjectFaultMsg
public InjectFaultMsg(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 contactvalue
- the amount of messages to drop, either as a
number of messages or a percent of messagesisPercent
- true if value
specifies a percentagenodeToDrop
- Drop messages from a specific node, instead of sender
InjectFaultMsg
public InjectFaultMsg(InputBuffer buffer)
throws QSException
serialize
public void serialize(OutputBuffer buffer)
- Description copied from interface:
QuickSerializable
- Add the object to the
buffer
.
- Specified by:
serialize
in interface QuickSerializable
- Overrides:
serialize
in class NetworkMessage
- Following copied from interface:
ostore.util.QuickSerializable
- Parameters:
buffer
- the output buffer to add the object to
clone
public Object clone()
throws CloneNotSupportedException
- Overrides:
clone
in class NetworkMessage
toString
public String toString()
- Overrides:
toString
in class NetworkMessage