ostore.util
Class StandardStage

java.lang.Object
  |
  +--ostore.util.StandardStage
All Implemented Interfaces:
EventHandlerIF
Direct Known Subclasses:
ArchiverStage, FakeClient, QTree, SDMBuilder, SDMBuilderTest

public abstract class StandardStage
extends Object
implements EventHandlerIF

Implements functionality common to most stages.

Version:
$Id: StandardStage.java,v 1.11 2004/05/03 08:46:59 hweather Exp $
Author:
Sean C. Rhea

Field Summary
protected  Classifier classifier
           
protected  boolean DEBUG
           
protected  Object[] event_types
           
protected  Object[] inb_msg_types
           
protected  org.apache.log4j.Logger logger
           
protected  NodeId my_node_id
           
protected  SinkIF my_sink
           
protected  Object[] outb_msg_types
           
protected  Resender resender
          a Resender used to remember pending requests
protected  Map resender_tokens
          a map storing Resender tokens for pending requests
protected  Object[] serializable_types
           
protected  boolean sim_running
           
protected  String tag
           
 
Constructor Summary
protected StandardStage()
           
 
Method Summary
protected  void BUG(Exception e)
          Like calling assert(false) in C; prints a stack trace.
protected  void BUG(String msg)
          Like calling assert(false) in C.
protected  void BUG(String msg, Exception e)
          Like calling assert(false) in C; prints a stack trace.
 void destroy()
           
protected  void dispatch(QueueElementIF item)
           
protected  void enqueue(QueueElementIF event, SinkIF sink)
           
 void handleEvents(QueueElementIF[] element_array)
           
 void init(ConfigDataIF config)
           
protected  long now_ms()
           
protected  long now_us()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface seda.sandStorm.api.EventHandlerIF
handleEvent
 

Field Detail

classifier

protected Classifier classifier

my_node_id

protected NodeId my_node_id

my_sink

protected SinkIF my_sink

tag

protected String tag

event_types

protected Object[] event_types

inb_msg_types

protected Object[] inb_msg_types

outb_msg_types

protected Object[] outb_msg_types

serializable_types

protected Object[] serializable_types

DEBUG

protected boolean DEBUG

sim_running

protected boolean sim_running

logger

protected org.apache.log4j.Logger logger

resender

protected Resender resender
a Resender used to remember pending requests


resender_tokens

protected Map resender_tokens
a map storing Resender tokens for pending requests

Constructor Detail

StandardStage

protected StandardStage()
Method Detail

now_ms

protected long now_ms()

now_us

protected long now_us()

BUG

protected final void BUG(String msg)
Like calling assert(false) in C.


BUG

protected final void BUG(String msg,
                         Exception e)
Like calling assert(false) in C; prints a stack trace.


BUG

protected final void BUG(Exception e)
Like calling assert(false) in C; prints a stack trace.


init

public void init(ConfigDataIF config)
          throws Exception
Specified by:
init in interface EventHandlerIF
Exception

destroy

public void destroy()
Specified by:
destroy in interface EventHandlerIF

handleEvents

public void handleEvents(QueueElementIF[] element_array)
                  throws EventHandlerException
Specified by:
handleEvents in interface EventHandlerIF
EventHandlerException

dispatch

protected void dispatch(QueueElementIF item)

enqueue

protected void enqueue(QueueElementIF event,
                       SinkIF sink)