Simias::Sync::SyncService Class Reference

server side top level class of SynkerA-style synchronization More...

Collaboration diagram for Simias::Sync::SyncService:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void Dispose ()
 Called to dispose.
void Start (ref StartSyncInfo si, string user, string sessionID)
 start sync of this collection -- perform basic role checks and dredge server file system
SyncNodeInfo[] NextNodeInfoList (ref int count, out string context)
 Get the next node info.
void Stop ()
 Called when done with the sync cycle.
SyncNodeStatus[] PutNonFileNodes (SyncNode[] nodes)
 Store the supplied nodes in the store.
SyncNodeStatus[] PutDirs (SyncNode[] nodes)
 Add the nodes as directories.
SyncNode[] GetNonFileNodes (string[] nodeIDs)
 Get the nodes that are not related to files.
SyncNode[] GetNonFileNodes (string[] nodeIDs, string UserID)
 Get the list of Non Files nodes for a particular user.
SyncNodeStatus[] DeleteNodes (string[] nodeIDs)
 Delete the nodes from the list.
SyncStatus PutFileNode (SyncNode node)
 Put the node that represents the file to the server. This call is made to begin an upload of a file. Close must be called to cleanup resources.
SyncNode GetFileNode (string nodeID)
 Get the node that represents the file. This call is made to begin a download of a file. Close must be called to cleanup resources.
FileStream GetHashMap (out int entryCount, out int blockSize)
 Get a HashMap of the file.
void PutHashMap (Stream stream, int Size)
 Put a HashMap of the file.
void Write (Stream stream, long offset, int count)
 Write the included data to the new file.
void Copy (long oldOffset, long offset, int count)
 Copy data from the old file to the new file.
int Read (Stream stream, long offset, int count)
 Read data from the currently opened file.
StreamStream GetReadStream ()
 Gets the read stream.
StreamStream GetWriteStream ()
 Get the WriteStream.
SyncNodeStatus CloseFileNode (bool commit)
 Close the current file.

Static Public Attributes

static readonly ISimiasLog log = SimiasLogManager.GetLogger(typeof(SyncService))
 Used to log to the log file.

Properties

string Version [get]
 simple version string, also useful to check remoting


Detailed Description

server side top level class of SynkerA-style synchronization


Member Function Documentation

void Simias::Sync::SyncService::Dispose (  )  [inline]

Called to dispose.

void Simias::Sync::SyncService::Start ( ref StartSyncInfo  si,
string  user,
string  sessionID 
) [inline]

start sync of this collection -- perform basic role checks and dredge server file system

Parameters:
si The start info to initialize the sync.
user This is temporary.
sessionID The unique sessionID.

SyncNodeInfo [] Simias::Sync::SyncService::NextNodeInfoList ( ref int  count,
out string  context 
) [inline]

Get the next node info.

Parameters:
count Number of nodes count needed
context Search context
Returns:
Sync Node info

void Simias::Sync::SyncService::Stop (  )  [inline]

Called when done with the sync cycle.

SyncNodeStatus [] Simias::Sync::SyncService::PutNonFileNodes ( SyncNode[]  nodes  )  [inline]

Store the supplied nodes in the store.

Parameters:
nodes The array of nodes to store.
Returns:
The status of the operation.

SyncNodeStatus [] Simias::Sync::SyncService::PutDirs ( SyncNode[]  nodes  )  [inline]

Add the nodes as directories.

Parameters:
nodes Nodes array to add
Returns:
Array of status for all nodes

SyncNode [] Simias::Sync::SyncService::GetNonFileNodes ( string[]  nodeIDs  )  [inline]

Get the nodes that are not related to files.

Parameters:
nodeIDs List of node ID's to check
Returns:
Array of Sync Nodes

SyncNode [] Simias::Sync::SyncService::GetNonFileNodes ( string[]  nodeIDs,
string  UserID 
) [inline]

Get the list of Non Files nodes for a particular user.

Parameters:
nodeIDs List of node ID's to check
UserID ID of the user for whom to get list of Nodes
Returns:
Array of sync nodes

SyncNodeStatus [] Simias::Sync::SyncService::DeleteNodes ( string[]  nodeIDs  )  [inline]

Delete the nodes from the list.

Parameters:
nodeIDs List of Node ID's to be deleted
Returns:
Array of status which represents for each node ID

SyncStatus Simias::Sync::SyncService::PutFileNode ( SyncNode  node  )  [inline]

Put the node that represents the file to the server. This call is made to begin an upload of a file. Close must be called to cleanup resources.

Parameters:
node The node to put to ther server.
Returns:
True if successful.

SyncNode Simias::Sync::SyncService::GetFileNode ( string  nodeID  )  [inline]

Get the node that represents the file. This call is made to begin a download of a file. Close must be called to cleanup resources.

Parameters:
nodeID The node to get.
Returns:
The SyncNode.

FileStream Simias::Sync::SyncService::GetHashMap ( out int  entryCount,
out int  blockSize 
) [inline]

Get a HashMap of the file.

Parameters:
entryCount The number of hash entries.
blockSize The size of the hashed data blocks.
Returns:
The HashMap.

void Simias::Sync::SyncService::PutHashMap ( Stream  stream,
int  Size 
) [inline]

Put a HashMap of the file.

void Simias::Sync::SyncService::Write ( Stream  stream,
long  offset,
int  count 
) [inline]

Write the included data to the new file.

Parameters:
stream The stream to write.
offset The offset in the new file of where to write.
count The number of bytes to write.

void Simias::Sync::SyncService::Copy ( long  oldOffset,
long  offset,
int  count 
) [inline]

Copy data from the old file to the new file.

Parameters:
oldOffset The offset in the old (original file).
offset The offset in the new file.
count The number of bytes to copy.

int Simias::Sync::SyncService::Read ( Stream  stream,
long  offset,
int  count 
) [inline]

Read data from the currently opened file.

Parameters:
stream Stream to read into.
offset The offset to begin reading.
count The number of bytes to read.
Returns:
The number of bytes read.

StreamStream Simias::Sync::SyncService::GetReadStream (  )  [inline]

Gets the read stream.

Returns:
The file stream.

StreamStream Simias::Sync::SyncService::GetWriteStream (  )  [inline]

Get the WriteStream.

Returns:
The file stream.

SyncNodeStatus Simias::Sync::SyncService::CloseFileNode ( bool  commit  )  [inline]

Close the current file.

Parameters:
commit True: commit the filenode and file. False: Abort the changes.
Returns:
The status of the sync.


Member Data Documentation

readonly ISimiasLog Simias::Sync::SyncService::log = SimiasLogManager.GetLogger(typeof(SyncService)) [static]

Used to log to the log file.


Property Documentation

string Simias::Sync::SyncService::Version [get]

simple version string, also useful to check remoting


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

Generated on Wed Apr 8 14:57:52 2009 for simias by  doxygen 1.5.6