IBR-DTNSuite 0.6

dtn::core::DataStorage Class Reference

#include <DataStorage.h>

Inheritance diagram for dtn::core::DataStorage:
Collaboration diagram for dtn::core::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 ()
bool __cancellation ()

Detailed Description

Definition at line 25 of file DataStorage.h.


Constructor & Destructor Documentation

dtn::core::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:

dtn::core::DataStorage::~DataStorage ( ) [virtual]

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

bool dtn::core::DataStorage::__cancellation ( ) [protected, virtual]

Reimplemented from ibrcommon::Thread.

Definition at line 173 of file DataStorage.cpp.

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

Here is the call graph for this function:

void dtn::core::DataStorage::iterateAll ( )

Definition at line 122 of file DataStorage.cpp.

References ibrcommon::File::getFiles(), and dtn::core::DataStorage::Callback::iterateDataStorage().

Referenced by dtn::core::SimpleBundleStorage::SimpleBundleStorage().

Here is the call graph for this function:

void dtn::core::DataStorage::remove ( const Hash hash)
DataStorage::istream dtn::core::DataStorage::retrieve ( const Hash hash) throw (DataNotAvailableException)

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::core::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:

const DataStorage::Hash dtn::core::DataStorage::store ( DataStorage::Container data)

Definition at line 148 of file DataStorage.cpp.

Referenced by run(), and dtn::core::SimpleBundleStorage::store().


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