atropos.lp
Class AvnmpRecQueue

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.Vector
                    |
                    +--atropos.util.OrderedList
                          |
                          +--atropos.lp.AvnmpQueue
                                |
                                +--atropos.lp.AvnmpRecQueue
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.util.List, java.io.Serializable

public class AvnmpRecQueue
extends AvnmpQueue

This class implements the AVNMP LP receive queue.

This research is funded by DARPA/ITO Contract Number: F30602-98-C-0230 supported by the Air Force Research Laboratory/IF.

Version:
$Revision: 1.1.1.1 $ $State: Exp $
Author:
Steve Bush
See Also:
Serialized Form

Field Summary
 java.lang.String AppOid
          The Management Object ID of the actual value.
 long numCausalityRb
          The number of causality based rollbacks.
 long numToleranceRb
          The number of out of tolerance based rollbacks.
 
Fields inherited from class atropos.lp.AvnmpQueue
QueueName
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
AvnmpRecQueue(java.lang.String oid)
          Construct an empty receive queue.
 
Method Summary
 long getLVT(AvnmpLP mylp, AvnmpTime st)
          This returns the smallest of any virtual message receive times still in the receive queue.
 AvnmpPacket getNext(AvnmpTime lvt, long lookahead, AvnmpLP mylp)
          Get the next packet to be processed from the this queue.
 AvnmpPacket lookNext(AvnmpTime lvt, long lookahead, AvnmpLP mylp)
          Look at, but do not remove, the next packet.
 long recvm(AvnmpPacket ap, AvnmpTime lvt, AvnmpLP mylp, AvnmpStateQueue sq, AvnmpTime st, AvnmpSndQueue vmoutq)
          Receive and check the tolerance of an input message.
 
Methods inherited from class atropos.lp.AvnmpQueue
add, addMessage, append, cancel, compare, deleteMessage, getClosestTime, getGreaterOrEqualRecTime, getGreaterOrEqualSndTime, getGreaterRecTime, getGreaterSndTime, getLessOrEqualRecTime, getLessOrEqualSndTime, getLessRecTime, getLessSndTime, getMessage, getReal, getVirtual, numReal, numVirtual, plotQueue, QtoString, queueSize, remove
 
Methods inherited from class atropos.util.OrderedList
clear, get, remove
 
Methods inherited from class java.util.Vector
add, addAll, addAll, addElement, capacity, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Field Detail

numCausalityRb

public long numCausalityRb
The number of causality based rollbacks.

numToleranceRb

public long numToleranceRb
The number of out of tolerance based rollbacks.

AppOid

public java.lang.String AppOid
The Management Object ID of the actual value.
Constructor Detail

AvnmpRecQueue

public AvnmpRecQueue(java.lang.String oid)
Construct an empty receive queue.
Parameters:
oid - This is the object identifier of the actual application value that AVNMP is predicting.
Method Detail

recvm

public long recvm(AvnmpPacket ap,
                  AvnmpTime lvt,
                  AvnmpLP mylp,
                  AvnmpStateQueue sq,
                  AvnmpTime st,
                  AvnmpSndQueue vmoutq)
           throws CausalityException,
                  ToleranceException
Receive and check the tolerance of an input message. If the message is virtual, check for anti-message cancellation and add to the receive queue. If a cancellation occurs, the anti-message within the queue is deleted, and the message is NOT added to the input queue. If the message is real, check the tolerance and rollback if necessary, throwing the appropriate exception. The physical process's Compute() method is not called here. It is called in inputvm() in AvnmpLP.
Parameters:
ap - Input packet
lvt - Local Virtual Time
mylp - The current logical process
sq - State Queue
st - (unused)
vmoutq - The Send Queue
Returns:
0 if ok, otherwise the time at which the rollback occurred. Also throws Causality or Tolerance exceptions when the packet is either about to be processed out-of-order or exceeds the prediction tolerance.
See Also:
ToleranceException, CausalityException, AvnmpLP.inputvm(atropos.lp.AvnmpPacket), AvnmpLP.getvm(atropos.lp.AvnmpPacket)

getLVT

public long getLVT(AvnmpLP mylp,
                   AvnmpTime st)
This returns the smallest of any virtual message receive times still in the receive queue.
Parameters:
mylp - The current logical process.
st - (unused)
Returns:
The local virtual time.

lookNext

public AvnmpPacket lookNext(AvnmpTime lvt,
                            long lookahead,
                            AvnmpLP mylp)
Look at, but do not remove, the next packet.
Parameters:
lvt - The current local vitual time.
lookahead - Do not pick one that exceeds lookahead.
mylp - The current logical process.
Returns:
The next packet that would be chosen from the receive queue.

getNext

public AvnmpPacket getNext(AvnmpTime lvt,
                           long lookahead,
                           AvnmpLP mylp)
Get the next packet to be processed from the this queue. Note that the message is deleted from the queue when it is returned. Thus, this method cannot be called twice to return the same message.
Parameters:
lvt - The local virtual time.
lookahead - The maximum distance in time to predict.
mylp - The current LP.
Returns:
The next packet for the physical process.


Copyright © 2002 GE Corporate Research and Development. All Rights Reserved.