servlib/bundling/BPQCache.h
changeset 56 76420d9f6e62
parent 55 1938118cd06c
child 64 1296a0283271
equal deleted inserted replaced
55:1938118cd06c 56:76420d9f6e62
    26 #include <oasys/util/StringUtils.h>
    26 #include <oasys/util/StringUtils.h>
    27 
    27 
    28 namespace dtn {
    28 namespace dtn {
    29 
    29 
    30 class BPQBlock;
    30 class BPQBlock;
    31 class FragmentState;
    31 class BPQCacheEntry;
    32 class EndpointID;
    32 class EndpointID;
    33 class BPQResponse;
    33 class BPQResponse;
    34 
    34 
    35 class BPQCache : public oasys::Logger {
    35 class BPQCache : public oasys::Logger {
    36 public:
    36 public:
    42 	 */
    42 	 */
    43     bool add_response_bundle(Bundle* bundle, BPQBlock* block);
    43     bool add_response_bundle(Bundle* bundle, BPQBlock* block);
    44 
    44 
    45     /**
    45     /**
    46      * Try to answer a BPQ query with a response in the cache
    46      * Try to answer a BPQ query with a response in the cache
       
    47      * @return  true if the query was successfully answered in full
       
    48      * 			false otherwise
    47      */
    49      */
    48     bool answer_query(Bundle* bundle, BPQBlock* block);
    50     bool answer_query(Bundle* bundle, BPQBlock* block);
    49 
    51 
    50     /**
    52     /**
    51      * Number of bundles in the cache
    53      * Number of bundles in the cache
    72 
    74 
    73 
    75 
    74     /**
    76     /**
    75      * Table of partial BPQ bundles
    77      * Table of partial BPQ bundles
    76      */
    78      */
    77     typedef oasys::StringHashMap<FragmentState*> Cache;
    79     typedef oasys::StringHashMap<BPQCacheEntry*> Cache;
    78     Cache bpq_table_;
    80     Cache bpq_table_;
    79 
    81 
    80 };
    82 };
    81 
    83 
    82 } // namespace dtn
    84 } // namespace dtn