Ignore:
Timestamp:
Sep 25, 2009, 2:30:33 PM (15 years ago)
Author:
mies
Message:

added basic DHT functionality (untested)

Location:
source/ariba/overlay/modules
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/overlay/modules/OverlayInterface.h

    r5870 r6266  
    116116        virtual const EndpointDescriptor& resolveNode(const NodeID& node) = 0;
    117117
     118
     119        /**
     120         * Returns true if this is the closest node to the given node
     121         * identifier.
     122         *
     123         * @param node The node identifier to compare with
     124         * @return True if this is the closest node to the given node identifier
     125         */
     126        virtual bool isClosestNodeTo( const NodeID& node ) = 0;
     127
    118128        /**
    119129         * Returns the nodes known to this overlay.
  • source/ariba/overlay/modules/chord/Chord.cpp

    r6198 r6266  
    181181        if (item == NULL || item->info.isUnspecified()) return EndpointDescriptor::UNSPECIFIED();
    182182        return baseoverlay.getEndpointDescriptor(item->info);
     183}
     184
     185/// @see OverlayInterface.h
     186bool Chord::isClosestNodeTo( const NodeID& node ) {
     187        return table->is_closest_to(node);
    183188}
    184189
  • source/ariba/overlay/modules/chord/Chord.h

    r5876 r6266  
    123123
    124124        /// @see OverlayInterface.h
     125        virtual bool isClosestNodeTo( const NodeID& node );
     126
     127        /// @see OverlayInterface.h
    125128        virtual NodeList getKnownNodes(bool deep = true) const;
    126129
  • source/ariba/overlay/modules/onehop/OneHop.cpp

    r5743 r6266  
    7979}
    8080
     81
     82/// @see OverlayInterface.h
     83bool OneHop::isClosestNodeTo( const NodeID& node ) {
     84        throw "NOT IMPLEMENTED!";
     85        return false;
     86}
     87
    8188void OneHop::routeMessage(const NodeID& destnode, Message* msg){
    8289
  • source/ariba/overlay/modules/onehop/OneHop.h

    r5624 r6266  
    8181
    8282        /// @see OverlayInterface.h
     83        virtual bool isClosestNodeTo( const NodeID& node );
     84
     85        /// @see OverlayInterface.h
    8386        virtual const LinkID& getNextLinkId( const NodeID& id ) const;
    8487
Note: See TracChangeset for help on using the changeset viewer.