ostore.replica
Class ReplicaManager

java.lang.Object
  |
  +--ostore.replica.ReplicaManager
All Implemented Interfaces:
EventHandlerIF

public class ReplicaManager
extends Object
implements EventHandlerIF

A SandStorm stage which manages the set of replicas maintained by this machine. The ReplicaManager acts as a high-level cache/hoard manager, installing and replacing objects which it believes will be useful in the future.

The ReplicaManager stage listens for events predicting future accesses. Such predictions could come from various sources, including cooperating peer servers, although currently the only source is a local HMMPredictor.

Each replica is assigned an estimated benefit and cost, where the cost includes the effort required to fetch and install the replica if it does not already exist. The ReplicaManager then deletes and creates replicas as necessary to maximize the estimated benefit/cost ratio.

Version:
$Id: ReplicaManager.java,v 1.10 2002/07/22 20:54:53 srhea Exp $
Author:
Dennis Geels

Field Summary
protected  String name
          The name by which to refer to this stage.
 
Constructor Summary
ReplicaManager()
           
 
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

name

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

Constructor Detail

ReplicaManager

public ReplicaManager()
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 Exception
Specified by:
init in interface EventHandlerIF
Exception

destroy

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