de.stz.bt.fnd
Class FND_InvokeIDPool

java.lang.Object
  extended byjava.lang.Thread
      extended byde.stz.bt.fnd.FND_InvokeIDPool
All Implemented Interfaces:
java.lang.Runnable

public class FND_InvokeIDPool
extends java.lang.Thread

Implementation of the ID Pool where the IDs of the sent and received UDP packets are managed. When an FND Datagram is being sent by the LZ, an InvokeID is being removed from the LZ's SP (send pool) and being transmitted to the Insel. Sent invoke_ids are being stored in the ShadowSendInvokeId so they can be timed out if the island crashed and the InvokeId never "comes back". When an FND Datagram is being received by the LZ, its InvokeID is being stored in the InvokeIdReceivePool. Upon sending the reply, the invokeID is being removed from the InvokeIdReceivePool, and being "handed back" with the reply to the Insel. The number of InvokeIDs created in the send pool is max_invoke. TODO: A timeout mechanism kills "old" (timed out) invokeIDs from the pools, as the requests they belong to must have timed out already.

Version:
$Id: FND_InvokeIDPool.html,v 1.1 2004/11/08 08:10:45 jseitter Exp $
Author:
Philipp Haeuser

Field Summary
private static org.apache.log4j.Logger logger
           
static int max_invoke
           
(package private)  java.util.LinkedList sendInvokeIDPool
           
(package private)  java.util.LinkedList shadowSendInvokeIDPool
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
FND_InvokeIDPool()
           
 
Method Summary
private  boolean addID(java.util.LinkedList checkList, FND_InvokeID checkId)
           
 boolean addSendInvokeID(FND_InvokeID addID)
           
 FND_InvokeID getFreeSendID()
           
private  boolean hasID(java.util.LinkedList checkList, FND_InvokeID checkId)
           
 boolean hasSendInvokeID(FND_InvokeID checkId)
           
private  boolean removeID(java.util.LinkedList checkList, FND_InvokeID checkId)
           
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sendInvokeIDPool

java.util.LinkedList sendInvokeIDPool

shadowSendInvokeIDPool

java.util.LinkedList shadowSendInvokeIDPool

logger

private static org.apache.log4j.Logger logger

max_invoke

public static final int max_invoke
See Also:
Constant Field Values
Constructor Detail

FND_InvokeIDPool

public FND_InvokeIDPool()
Method Detail

run

public void run()

addID

private boolean addID(java.util.LinkedList checkList,
                      FND_InvokeID checkId)

removeID

private boolean removeID(java.util.LinkedList checkList,
                         FND_InvokeID checkId)

addSendInvokeID

public boolean addSendInvokeID(FND_InvokeID addID)

getFreeSendID

public FND_InvokeID getFreeSendID()

hasID

private boolean hasID(java.util.LinkedList checkList,
                      FND_InvokeID checkId)

hasSendInvokeID

public boolean hasSendInvokeID(FND_InvokeID checkId)