DART

DART support for HiRPC(dartRead,dartRim,dartBullseye and dartModify) DART include support for synchronization

Constructors

this
this(SecureNet net, string filename, Flag!"read_only" read_only, ushort from_sector, ushort to_sector)

Creates DART with given net and by given file path

this
this(SecureNet net, string filename, Exception exception, Flag!"read_only" read_only, ushort from_sector, ushort to_sector)

Creates DART with given net and by given file path safely with catching possible exceptions

Members

Classes

SynchronizationFiber
class SynchronizationFiber

Synchronizer which supports synchronization from multiplet DART's

Functions

inRange
bool inRange(ushort sector)

Check if the sector is within the DART angle

opCall
const(HiRPC.Sender) opCall(const(HiRPC.Receiver) received, bool read_only)

This function handles HPRC Queries to the DART

replay
void replay(const(string) journal_filename)

Replays the journal file to update the DART The update blockfile can be generated from the synchroning process from an foreign dart

sectors
SectorRange sectors()

Creates a SectorRange for the DART

synchronizer
SynchronizationFiber synchronizer(Synchronizer synchonizer, Rims rims)

Creates a synchronization fiber from a synchroizer

Structs

Journal
struct Journal

Recorder journal

Inherited Members

From DARTFile

close
void close()

Close the DARTFile

bullseye
alias bullseye = fingerprint

Ditto for fingerprint

recorder
RecordFactory.Recorder recorder()

Creates a recorder factor

recorder
RecordFactory.Recorder recorder(const(Document) doc)

Creates a recorder from a document using the RecorderFactory used by the DART

recorder
RecordFactory.Recorder recorder(RecordFactory.Recorder.Archives archives)

Ditto

Branches
struct Branches

Data struct which contains the branches in sub-tree

load
Document load(const(Branches) b, uint key)

Reads the data at branch key

RimWalkerFiber
class RimWalkerFiber
Undocumented in source.
rimWalkerRange
RimWalkerFiber rimWalkerRange(immutable(Buffer) rim_paths)

A range which traverse the branches below the rim_paths The range build as a Fiber.

indent
string indent(uint rim_level)

Create indet string a rim_level

loads
RecordFactory.Recorder loads(Range dart_indices, Archive.Type type)

Loads all the archives in the list of fingerprints

modify
Fingerprint modify(const(RecordFactory.Recorder) modifyrecords, Flag!"undo" undo)

Wrapper function for the modify function.

modify
Fingerprint modify(const(RecordFactory.Recorder) modifyrecords)
Sample of the DART Map
key[0]key[1]key[2]key[3]key[4]
rim0001020304....
20A333B117-> archive fingerprint=20_A3_33_B1_17....
********42-> archive fingerprint=20_A3_33_B1_42....
****57B117-> archive fingerprint=20_A3_57_B1_17....
********42-> archive fingerprint=20_A3_57_B1_42....
****C2-> archive fingerprint=20_A3_C3....
****CA48-> archive fingerprint=20_A3_CA_48....
******68-> archive fingerprint=20_A3_CA_48....

Sector=[key[0],key[1]] <br> ### Note ** means the same value as above The first two rims is set the sector and the following is rims represents the key index into the Branches incices The modifyrecords contains the archives which is going to be added or deleted The type of archive tells which actions are going to be performed by the modifier If the function executes successfully then the DART is updated or else it does not affect the DART The function returns the bullseye of the dart

futureEye
Fingerprint futureEye(const(RecordFactory.Recorder) modifyrecords, Flag!"undo" undo)

Wrapper function for the modify function.

branches
Branches branches(const(ubyte[]) rim_path, Index* branch_index)

Loads the branches from the DART at rim_path

dump
void dump(SectorRange sectors, Flag!"full" full, uint depth)

Dumps the dart as rim-path

Examples