ostore.tapestry.impl
Class DynamicTClient
java.lang.Object
|
+--ostore.util.StandardStage
|
+--ostore.util.AckStage
|
+--ostore.tapestry.impl.DynamicTClient
- All Implemented Interfaces:
- EventHandlerIF, ProfilableIF, SingleThreadedEventHandlerIF
- public class DynamicTClient
- extends AckStage
- implements SingleThreadedEventHandlerIF, EventHandlerIF, ProfilableIF
The stage that handles all dynamic behavior of a Tapestry node. Pretty
much everything done in Tapestry is here, with the exception of core
routing of messages. This handles node insertion, deletion, requests for
diagnostic or debugging info, introduction service, self-repair, and
failover to backup routes.
- Version:
- $Id: DynamicTClient.java,v 1.154 2003/06/06 00:08:58 strib Exp $
- Author:
- Ben Y. Zhao
Methods inherited from class ostore.util.AckStage |
destroy, findAssociatedNonce, forceRegisterNonce, forceSendAck, handleAlarmSignal, handleEvent, handleEvents, postprocessAcks, preprocessAcks, receivedAck, sendNonceAckMsg, sendNonceMsg |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NOT_ATTACHED
public static final int NOT_ATTACHED
INSERT_MCAST_MODE
public static final int INSERT_MCAST_MODE
INSERT_NEARESTN_MODE
public static final int INSERT_NEARESTN_MODE
ATTACHED
public static final int ATTACHED
DETACH_ROUTINGOBJ
public static final int DETACH_ROUTINGOBJ
DETACH_FINALACK
public static final int DETACH_FINALACK
DynamicTClient
public DynamicTClient()
throws Exception
profileSize
public int profileSize()
- Specified by:
profileSize
in interface ProfilableIF
init
public void init(ConfigDataIF config)
throws Exception
- Initialization
- Specified by:
init
in interface EventHandlerIF
- Overrides:
init
in class AckStage
handle_stages_init_signal
protected void handle_stages_init_signal()
- Got a StagesInitSignal
Do nothing for now, wait for NodeGuid
handle_node_guid
protected void handle_node_guid(NodeGuid local_node_guid)
- Someone else (probably the router) told us our NodeGuid. Now we
can do some real initialization and start integration, if we
are dynamic.
requestRepublish
public void requestRepublish()
- Method called to look through the _objlevels mapping, and take all
objects which route through this node, and send requests for republish
to their originating nodes. This function is called by the handler
of NodeDetach, after the BeginDelete message has been sent to the
backpointed nodes.
handle_debugmsg
public void handle_debugmsg(DebugMsg msg)
- handle a message asking you for your routing info
handle_event
public void handle_event(QueueElementIF item)
throws EventHandlerException
- Send an incoming event to the correct handler
- Overrides:
handle_event
in class AckStage
timeoutCallback
protected void timeoutCallback(NonceMsg nm,
Object userData)
- Description copied from class:
AckStage
- Application level timeout. Must be overloaded by the child class.
- Overrides:
timeoutCallback
in class AckStage
- Following copied from class:
ostore.util.AckStage
- Parameters:
msg
- the msg that was never ackeduserData
- the data passed into AckStage.sendNonceMsg(ostore.util.NonceMsg, long, java.lang.Object)
getPingTime
public double getPingTime(NodeId remoteHost)
- Get the ping time to a node.
TODO: make asynchronous somehow
print_id
public String print_id(int[] id)
- Print an id in hex format
moveObj
public boolean moveObj(int[] olddigits,
int[] newdigits,
SecureHash objGuid)
- Should this object be moved to the new node?