org.jgroups.protocols

Class FC


public class FC
extends Protocol

Simple flow control protocol based on a credit system. Each sender has a number of credits (bytes to send). When the credits have been exhausted, the sender blocks. Each receiver also keeps track of how many credits it has received from a sender. When credits for a sender fall below a threshold, the receiver sends more credits to the sender. Works for both unicast and multicast messages.
Note that this protocol must be located towards the top of the stack, or all down_threads from JChannel to this protocol must be set to false ! This is in order to block JChannel.send()/JChannel.down().
Version:
$Revision: 1.12 $
Author:
Bela Ban

Nested Class Summary

static class
FC.FcHeader

Field Summary

Fields inherited from class org.jgroups.stack.Protocol

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

Method Summary

void
down(Event evt)
String
getName()
boolean
setProperties(Properties props)
void
up(Event evt)

Methods inherited from class org.jgroups.stack.Protocol

destroy, down, getDownProtocol, getDownQueue, getName, getProperties, getUpProtocol, getUpQueue, handleSpecialDownEvent, init, passDown, passUp, providedDownServices, providedUpServices, receiveDownEvent, receiveUpEvent, requiredDownServices, requiredUpServices, setDownProtocol, setObserver, setProperties, setPropertiesInternal, setProtocolStack, setUpProtocol, start, startDownHandler, startUpHandler, stop, stopInternal, up

Method Details

down

public void down(Event evt)
Overrides:
down in interface Protocol

getName

public String getName()
Overrides:
getName in interface Protocol

setProperties

public boolean setProperties(Properties props)
Overrides:
setProperties in interface Protocol

up

public void up(Event evt)
Overrides:
up in interface Protocol

Copyright B) 2001,2002 www.jgroups.com . All Rights Reserved.