org.edg.info
Class Queue

java.lang.Object
  extended byorg.edg.info.Queue

public class Queue
extends java.lang.Object

Queue of tuples in a producer.

Version:
$Revision: 1.3.4.22.2.5 $
Author:
$author$

Field Summary
static int s_maxTupleMemory
          Max memory available to tuples (in bytes).
 
Method Summary
 void clear()
          Removes all tuples from the queue and reduces curentTotalMemory appropriately.
static int getCurrentTotalMemory()
          Deprecated.  
 long getLastInsertTimeMillis()
           
 long getLastSuccessfulInsertTimeMillis()
           
static int getMaxTupleMemory()
          Deprecated.  
 long getMaxTupleMemoryKB()
           
 long getTotalNumberInsertedTuples()
           
 long getTotalTupleMemoryUsedKB()
           
 long getTupleMemoryUsedKB()
           
 void incTotalNumberInsertedTuples()
          Increments the total number of inserted tuples by one.
 void markAllTuplesAsStreamed()
          Mark all tuples in the queue as having had a chance to be streamed.
static void setMaxTupleMemory(int mtm)
          Sets the maximum tuple memory.
 void updateLastInsertTime()
          Updates the last insert time in milliseconds.
 void updateLastSuccessfulInsertTime()
          Updates the last successful insert time in milliseconds.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

s_maxTupleMemory

public static int s_maxTupleMemory
Max memory available to tuples (in bytes).

Method Detail

clear

public void clear()
Removes all tuples from the queue and reduces curentTotalMemory appropriately.


markAllTuplesAsStreamed

public void markAllTuplesAsStreamed()
Mark all tuples in the queue as having had a chance to be streamed. This allows the tuples to be deleted from the queue when they expire the HRP.


setMaxTupleMemory

public static void setMaxTupleMemory(int mtm)
Sets the maximum tuple memory.

Parameters:
mtm - Maximum tuple memory (in bytes).

getCurrentTotalMemory

public static int getCurrentTotalMemory()
Deprecated.  

Gets the current total memory.

Returns:
Current total memory (in bytes).

getMaxTupleMemory

public static int getMaxTupleMemory()
Deprecated.  

Gets the max total memory.

Returns:
Max total memory (in bytes).

updateLastInsertTime

public void updateLastInsertTime()
Updates the last insert time in milliseconds.


updateLastSuccessfulInsertTime

public void updateLastSuccessfulInsertTime()
Updates the last successful insert time in milliseconds.


getLastInsertTimeMillis

public long getLastInsertTimeMillis()
Returns:
Returns the last insert time in milliseconds.

getLastSuccessfulInsertTimeMillis

public long getLastSuccessfulInsertTimeMillis()
Returns:
Returns the last successful insert time in milliseconds.

getTotalNumberInsertedTuples

public long getTotalNumberInsertedTuples()
Returns:
Returns the total number of inserted tuples.

incTotalNumberInsertedTuples

public void incTotalNumberInsertedTuples()
Increments the total number of inserted tuples by one.


getTupleMemoryUsedKB

public long getTupleMemoryUsedKB()
Returns:
Returns the estimated tuple size in KBytes.

getMaxTupleMemoryKB

public long getMaxTupleMemoryKB()
Returns:
Returns the maximum tuple memory available in KBytes.

getTotalTupleMemoryUsedKB

public long getTotalTupleMemoryUsedKB()
Returns:
Returns the tuple memory being used by the queue in KBytes.