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

added basic DHT functionality (untested)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/overlay/BaseOverlay.h

    r5916 r6266  
    122122class LinkDescriptor;
    123123class OverlayMsg;
     124class DHT;
    124125
    125126class BaseOverlay: public MessageReceiver,
     
    284285        void leaveSpoVNet();
    285286
     287        /// put a value to the DHT with a ttl given in seconds
     288        void dhtPut( const Data& key, const Data& value, int ttl = 0);
     289
     290        /// removes a key value pair from the DHT
     291        void dhtRemove( const Data& key, const Data& value );
     292
     293        /// removes all data stored at the given key
     294        void dhtRemove( const Data& key );
     295
     296        /// requests data stored using key
     297        void dhtGet( const Data& key, const ServiceID& service );
     298
    286299protected:
    287 
    288300        /**
    289301         * @see ariba::communication::CommunicationEvents.h
     
    397409        bool handleJoinReply( OverlayMsg* msg, const LinkID& bcLink );
    398410
     411        // handle DHT messages
     412        bool handleDHTMessage( OverlayMsg* msg );
     413
    399414        // handle link messages
    400415        bool handleLinkRequest( OverlayMsg* msg, LinkDescriptor* ld );
     
    403418        bool handleLinkDirect( OverlayMsg* msg, LinkDescriptor* ld );
    404419        bool handleLinkAlive( OverlayMsg* msg, LinkDescriptor* ld );
     420
    405421
    406422        // link state handling -----------------------------------------------------
     
    487503                bool ignore_down = false );
    488504
     505        // distributed hashtable handling ------------------------------------------
     506
     507        DHT* dht;
     508
     509        void stabilizeDHT();
     510
    489511        // misc --------------------------------------------------------------------
    490512
Note: See TracChangeset for help on using the changeset viewer.