dd.ptr.impl
Class PtrMgr

java.lang.Object
  |
  +--ostore.util.StandardStage
        |
        +--dd.ptr.impl.PtrMgr
All Implemented Interfaces:
EventHandlerIF, SingleThreadedEventHandlerIF

public class PtrMgr
extends StandardStage
implements SingleThreadedEventHandlerIF

The PtrMgr provides a unified interface to the PtrDB and the HostDB. The PtrMgr is DHT independent and works over any DHT that supports a generic Put and Get interface.

Version:
$Id: PtrMgr.java,v 1.9 2004/05/19 06:33:43 hweather Exp $
Author:
Hakim Weatherspoon

Field Summary
protected  boolean _initialized
          Registered with all local stages have been initialized
protected static long appId
          Unique identifier for this stage.
protected  long init_start_time_ms
          The time this stage was started.
 
Fields inherited from class ostore.util.StandardStage
classifier, DEBUG, event_types, inb_msg_types, logger, my_node_id, my_sink, outb_msg_types, resender, resender_tokens, serializable_types, sim_running, tag
 
Constructor Summary
PtrMgr()
          Constructor: Creates a new PtrMgr stage.
 
Method Summary
 void addToPtrCache(Map table, SecureHash objguid, PublishInfo pinfo)
          addToPtrCache updates the ptrRootCache or the ptrNonRootCache with given objguid and PublishInfo.
 void handleEvent(QueueElementIF item)
           
 void init(ConfigDataIF config)
           
 
Methods inherited from class ostore.util.StandardStage
BUG, BUG, BUG, destroy, dispatch, enqueue, handleEvents, now_ms, now_us
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

appId

protected static final long appId
Unique identifier for this stage.


_initialized

protected boolean _initialized
Registered with all local stages have been initialized


init_start_time_ms

protected long init_start_time_ms
The time this stage was started.

Constructor Detail

PtrMgr

public PtrMgr()
       throws Exception
Constructor: Creates a new PtrMgr stage.

Method Detail

init

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

handleEvent

public void handleEvent(QueueElementIF item)
                 throws EventHandlerException
Specified by:
handleEvent in interface EventHandlerIF
EventHandlerException

addToPtrCache

public void addToPtrCache(Map table,
                          SecureHash objguid,
                          PublishInfo pinfo)
addToPtrCache updates the ptrRootCache or the ptrNonRootCache with given objguid and PublishInfo.

Parameters:
table - Either the ptrRootCache or the ptrNonRootCache.
objguid - Identifier to update.
pinfo - PublishInfo to update.