org.jgroups.protocols

Class DEADLOCK

Implemented Interfaces:
RequestHandler

public class DEADLOCK
extends RpcProtocol

Tests the deadlock detection mechanism of RequestCorrelator.

Field Summary

Fields inherited from class org.jgroups.stack.MessageProtocol

_corr, members

Fields inherited from class org.jgroups.stack.Protocol

down_handler, down_prot, down_queue, down_thread, down_thread_prio, log, observer, props, stack, stats, trace, up_handler, up_prot, up_queue, up_thread, up_thread_prio, warn

Method Summary

int
getCombinedResults()
Mcasts getResult() to all members (including itself).
String
getName()
static int
getResult()
Returns a random integer value between 1 and 10
boolean
handleDownEvent(Event evt)
Callback.
boolean
handleUpEvent(Event evt)
Callback.
int
sendRequest(Address dest)
void
start()
void
stop()

Methods inherited from class org.jgroups.stack.RpcProtocol

callRemoteMethod, callRemoteMethod, callRemoteMethod, callRemoteMethod, callRemoteMethods, callRemoteMethods, callRemoteMethods, getName, handle, handleDownEvent, handleUpEvent

Methods inherited from class org.jgroups.stack.MessageProtocol

castMessage, down, handle, handleDownEvent, handleUpEvent, sendMessage, start, stop, up, updateView

Methods inherited from class org.jgroups.stack.Protocol

destroy, down, downThreadEnabled, dumpStats, enableStats, getDownProtocol, getDownQueue, getName, getProperties, getUpProtocol, getUpQueue, handleSpecialDownEvent, init, isTrace, isWarn, passDown, passUp, printStats, providedDownServices, providedUpServices, receiveDownEvent, receiveUpEvent, requiredDownServices, requiredUpServices, resetStats, setDownProtocol, setObserver, setProperties, setPropertiesInternal, setProtocolStack, setTrace, setUpProtocol, setWarn, start, startDownHandler, startUpHandler, statsEnabled, stop, stopInternal, up, upThreadEnabled

Method Details

getCombinedResults

public int getCombinedResults()
Mcasts getResult() to all members (including itself). Returns the sum of all results.

getName

public String getName()
Overrides:
getName in interface RpcProtocol

getResult

public static int getResult()
Returns a random integer value between 1 and 10

handleDownEvent

public boolean handleDownEvent(Event evt)
Callback. Called by superclass when event may be handled.

Do not use PassDown in this method as the event is passed down by default by the superclass after this method returns !

Overrides:
handleDownEvent in interface RpcProtocol
Returns:
boolean Defaults to true. If false, event will not be passed down the stack.

handleUpEvent

public boolean handleUpEvent(Event evt)
Callback. Called by superclass when event may be handled.

Do not use PassUp in this method as the event is passed up by default by the superclass after this method returns !

Overrides:
handleUpEvent in interface RpcProtocol
Returns:
boolean Defaults to true. If false, event will not be passed up the stack.

sendRequest

public int sendRequest(Address dest)

start

public void start()
            throws Exception
Overrides:
start in interface MessageProtocol

stop

public void stop()
Overrides:
stop in interface MessageProtocol

Copyright B) 1998-2005 Bela Ban. All Rights Reserved.