edu.vt.marian.server
Class function_queue

java.lang.Object
  |
  +--edu.vt.marian.server.function_queue

public class function_queue
extends java.lang.Object

class name: function_queue class description: this class represent a function queue, functions can be put into it and take out from it, since this is a queue, they follow FIFO (first in first out) rules. uses the services of class(es): designer(s): Jianxin Zhao (jxzhao@csgrad.cs.vt.edu) implementator(s): Ning Chai (nchai@csgrad.cs.vt.edu) finished time: Nov 26th, 1998 known bugs: JDK version: 1.1.5 side effects:


Field Summary
static int NULL_RPC_FUNCTION
           
static int OK
           
static int QUEUE_OVERFLOW
           
 
Constructor Summary
function_queue(int max_number_functions, edu.vt.marian.common.Debug debug)
          method description: this constructor will create a function queue object, the maximum number of functions can be contained in this object is specified by the parameter uses the services of class(es): input parameter(s): max_number_functions -- this specified at most how many functions this queue can store debug -- used for debugging output parameter(s): none return value: none synchronization: none
 
Method Summary
 int enter_function(edu.vt.marian.uip.rpc_function rf)
          method description: this method will put the specified function to the end of the queue represented by this object uses the services of class(es): none input parameter(s): none output parameter(s): none return value: OK -- the function has been entered successfully QUEUE_OVERFLOW -- the function is not entered because the upper limit of the queue has been reached NULL_RPC_FUNCTION -- the parameter rf is null synchronization: synchronized
 edu.vt.marian.uip.rpc_function get_next_function()
          method description: this method will take a function from the head of this queue uses the services of class(es): none input parameter(s): none output parameter(s): none return value: a rpc_function object -- this is the function at the head position before this method is called null -- the queue is empty when this method is called synchronization: synchronized
 int get_number_functions()
          method description: this method will tell how many functions currently are contained in this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OK

public static final int OK

QUEUE_OVERFLOW

public static final int QUEUE_OVERFLOW

NULL_RPC_FUNCTION

public static final int NULL_RPC_FUNCTION
Constructor Detail

function_queue

public function_queue(int max_number_functions,
                      edu.vt.marian.common.Debug debug)
method description: this constructor will create a function queue object, the maximum number of functions can be contained in this object is specified by the parameter uses the services of class(es): input parameter(s): max_number_functions -- this specified at most how many functions this queue can store debug -- used for debugging output parameter(s): none return value: none synchronization: none
Method Detail

get_next_function

public edu.vt.marian.uip.rpc_function get_next_function()
method description: this method will take a function from the head of this queue uses the services of class(es): none input parameter(s): none output parameter(s): none return value: a rpc_function object -- this is the function at the head position before this method is called null -- the queue is empty when this method is called synchronization: synchronized

get_number_functions

public int get_number_functions()
method description: this method will tell how many functions currently are contained in this object. uses the services of class(es): none input parameter(s): none output parameter(s): none return value: an integer specifies the current number of functions in this queue synchronization: none

enter_function

public int enter_function(edu.vt.marian.uip.rpc_function rf)
method description: this method will put the specified function to the end of the queue represented by this object uses the services of class(es): none input parameter(s): none output parameter(s): none return value: OK -- the function has been entered successfully QUEUE_OVERFLOW -- the function is not entered because the upper limit of the queue has been reached NULL_RPC_FUNCTION -- the parameter rf is null synchronization: synchronized