IBR-DTNSuite  0.8
dtn::storage::DataStorage Class Reference

#include <DataStorage.h>

Inheritance diagram for dtn::storage::DataStorage:
Collaboration diagram for dtn::storage::DataStorage:

List of all members.

Classes

class  Callback
class  Container
class  DataNotAvailableException
class  Hash
class  istream
class  RemoveDataTask
class  StoreDataTask
class  Task

Public Member Functions

 DataStorage (Callback &callback, const ibrcommon::File &path, size_t write_buffer=0, bool initialize=false)
virtual ~DataStorage ()
const Hash store (Container *data)
void store (const Hash &hash, Container *data)
DataStorage::istream retrieve (const Hash &hash) throw (DataNotAvailableException)
void remove (const Hash &hash)
void iterateAll ()

Protected Member Functions

void run ()
void __cancellation ()

Detailed Description

Definition at line 25 of file DataStorage.h.


Constructor & Destructor Documentation

dtn::storage::DataStorage::DataStorage ( Callback callback,
const ibrcommon::File path,
size_t  write_buffer = 0,
bool  initialize = false 
)

Definition at line 79 of file DataStorage.cpp.

References ibrcommon::File::createDirectory(), ibrcommon::File::exists(), and ibrcommon::File::getFiles().

Here is the call graph for this function:

Definition at line 105 of file DataStorage.cpp.

References ibrcommon::Queue< T >::abort(), ibrcommon::Queue< T >::getnpop(), and ibrcommon::JoinableThread::join().

Here is the call graph for this function:


Member Function Documentation

void dtn::storage::DataStorage::__cancellation ( ) [protected, virtual]

Implements ibrcommon::Thread.

Definition at line 173 of file DataStorage.cpp.

References ibrcommon::Queue< T >::abort().

Here is the call graph for this function:

Definition at line 156 of file DataStorage.cpp.

References ibrcommon::File::exists(), and ibrcommon::File::get().

Here is the call graph for this function:

void dtn::storage::DataStorage::store ( const Hash hash,
DataStorage::Container data 
)

Definition at line 139 of file DataStorage.cpp.

References ibrcommon::Queue< T >::push(), and ibrcommon::Semaphore::wait().

Here is the call graph for this function:


The documentation for this class was generated from the following files: