ostore.replica
Class ReplicaStage

java.lang.Object
  |
  +--ostore.replica.ReplicaStage
All Implemented Interfaces:
EventHandlerIF, SingleThreadedEventHandlerIF

public class ReplicaStage
extends Object
implements SingleThreadedEventHandlerIF, EventHandlerIF

A template java file, useful for maintaining personal coding conventions for new EventHandlerIF classes.

FIXME!! Make algorithms thread-safe.

Version:
$Id: ReplicaStage.java,v 1.97 2004/05/13 20:16:27 hweather Exp $
Author:
Dennis Geels

Nested Class Summary
static class ReplicaStage.PendingCloseTimer
          Dispatched to self when a close_all was received but we are still waiting on pending events.
 
Field Summary
protected static long ALARM_TIMEOUT
           
protected static long HB_TIMEOUT
          The length of time (in ms) a Heartbeat is fresh enough to prevent requests for new ones.
static boolean ignore_local_replica
          HACK - nullify latency benefits of caching heartbeats locally.
protected  String name
          The name by which to refer to this stage.
 
Constructor Summary
ReplicaStage()
          Constructs an empty ReplicaStage.
 
Method Summary
 void destroy()
           
 void handleEvent(QueueElementIF elem)
           
 void handleEvents(QueueElementIF[] elemarr)
           
 void init(ConfigDataIF config)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALARM_TIMEOUT

protected static final long ALARM_TIMEOUT
See Also:
Constant Field Values

HB_TIMEOUT

protected static final long HB_TIMEOUT
The length of time (in ms) a Heartbeat is fresh enough to prevent requests for new ones.

See Also:
Constant Field Values

name

protected String name
The name by which to refer to this stage. It should be the name of the corresponding StageIF.


ignore_local_replica

public static boolean ignore_local_replica
HACK - nullify latency benefits of caching heartbeats locally.

Constructor Detail

ReplicaStage

public ReplicaStage()
Constructs an empty ReplicaStage.

Method Detail

handleEvent

public void handleEvent(QueueElementIF elem)
                 throws UnknownEventException
Specified by:
handleEvent in interface EventHandlerIF
UnknownEventException

handleEvents

public void handleEvents(QueueElementIF[] elemarr)
                  throws UnknownEventException
Specified by:
handleEvents in interface EventHandlerIF
UnknownEventException

init

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

destroy

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