|
IBR-DTN
1.0.0
|
#include <MemoryBundleSet.h>


Public Member Functions | |
| MemoryBundleSet (BundleSet::Listener *listener=NULL, Length bf_size=1024) | |
| MemoryBundleSet (const std::string &name, BundleSet::Listener *listener=NULL, Length bf_size=1024) | |
| virtual | ~MemoryBundleSet () |
| virtual refcnt_ptr< BundleSetImpl > | copy () const |
| virtual void | assign (const refcnt_ptr< BundleSetImpl > &) |
| virtual void | add (const dtn::data::MetaBundle &bundle) throw () |
| virtual void | clear () throw () |
| virtual bool | has (const dtn::data::BundleID &bundle) const throw () |
| virtual void | expire (const Timestamp timestamp) throw () |
| virtual Size | size () const throw () |
| Length | getLength () const throw () |
| const ibrcommon::BloomFilter & | getBloomFilter () const throw () |
| std::set< dtn::data::MetaBundle > | getNotIn (const ibrcommon::BloomFilter &filter) const throw () |
| virtual std::ostream & | serialize (std::ostream &stream) const |
| virtual std::istream & | deserialize (std::istream &stream) |
| virtual void | sync () throw () |
Public Member Functions inherited from dtn::data::BundleSetImpl | |
| virtual | ~BundleSetImpl ()=0 |
Static Public Member Functions | |
| static void | setPath (const ibrcommon::File &path) |
Definition at line 38 of file MemoryBundleSet.h.
| dtn::data::MemoryBundleSet::MemoryBundleSet | ( | BundleSet::Listener * | listener = NULL, |
| Length | bf_size = 1024 |
||
| ) |
Constructor
| listener | This listener gets notified about expired bundles. |
| bf_size | Initial size fo the bloom-filter. |
Definition at line 33 of file MemoryBundleSet.cpp.
Referenced by copy().
| dtn::data::MemoryBundleSet::MemoryBundleSet | ( | const std::string & | name, |
| BundleSet::Listener * | listener = NULL, |
||
| Length | bf_size = 1024 |
||
| ) |
Constructor
| name | The identifier of the named bundle-set. |
| listener | This listener gets notified about expired bundles. |
| bf_size | Initial size fo the bloom-filter. |
Definition at line 38 of file MemoryBundleSet.cpp.
|
virtual |
Destructor
Definition at line 50 of file MemoryBundleSet.cpp.
|
virtual | ||||||||||||||
Add a bundle to the bundle-set
Implements dtn::data::BundleSetImpl.
Definition at line 109 of file MemoryBundleSet.cpp.
|
virtual |
clears the bundle-set and copy all entries from the given one into this bundle-set
Implements dtn::data::BundleSetImpl.
Definition at line 77 of file MemoryBundleSet.cpp.
References clear().

|
virtual | |||||||||||||
Clear the whole bundle-set
Implements dtn::data::BundleSetImpl.
Definition at line 121 of file MemoryBundleSet.cpp.
Referenced by assign(), and deserialize().
|
virtual |
copies the current bundle-set into a new temporary one
Implements dtn::data::BundleSetImpl.
Definition at line 55 of file MemoryBundleSet.cpp.
References MemoryBundleSet().

|
virtual |
Load the bloom-filter from a stream
Implements dtn::data::BundleSetImpl.
Definition at line 229 of file MemoryBundleSet.cpp.
References clear().

|
virtual | ||||||||||||||
Check for expired entries in this bundle-set and remove them
Implements dtn::data::BundleSetImpl.
Definition at line 149 of file MemoryBundleSet.cpp.
References dtn::data::BundleSetImpl::ExpiringBundle::bundle, and dtn::data::MetaBundle::expiretime.
|
virtual | |||||||||||||
Get the bloom-filter of this bundle-set
Implements dtn::data::BundleSetImpl.
Definition at line 189 of file MemoryBundleSet.cpp.
|
virtual | |||||||||||||
Returns the data length of the serialized BundleSet
Implements dtn::data::BundleSetImpl.
Definition at line 213 of file MemoryBundleSet.cpp.
|
virtual | ||||||||||||||
Return bundles not in the given bloom-filter
Implements dtn::data::BundleSetImpl.
Definition at line 194 of file MemoryBundleSet.cpp.
|
virtual | ||||||||||||||
Check if a bundle id is in this bundle-set
Implements dtn::data::BundleSetImpl.
Definition at line 129 of file MemoryBundleSet.cpp.
References dtn::data::MetaBundle::create().

|
virtual |
Serialize the bloom-filter of this bundle-set into a stream
Implements dtn::data::BundleSetImpl.
Definition at line 218 of file MemoryBundleSet.cpp.
References size().

|
static |
Sets the store path for MemoryBundleSets
Definition at line 247 of file MemoryBundleSet.cpp.
|
virtual | |||||||||||||
Returns the number of elements in this set
Implements dtn::data::BundleSetImpl.
Definition at line 144 of file MemoryBundleSet.cpp.
Referenced by serialize().
|
virtual | |||||||||||||
Synchronize the bundle-set with the persistent set on the disk.
Reimplemented from dtn::data::BundleSetImpl.
Definition at line 261 of file MemoryBundleSet.cpp.