C# Class Brod.Storage.Segment

Inheritance: IDisposable
Mostra file Open project: paralect/brod Class Usage Examples

Public Methods

Method Description
Append ( byte payload ) : void
Dispose ( ) : void
Flush ( bool flushOnDisk ) : void
ReadMessagesBlock ( Int32 offset, Int32 blockLength ) : MessagesBlock

Read bytes, starting from byte from specified and

Segment ( String logDirectory, System.Int64 offset ) : System

Private Methods

Method Description
CreateEmptyFile ( string filePath ) : void

Creates empty file with specified path and name

GetSegmentFileName ( System.Int64 offset ) : String
Init ( ) : void

Method Details

Append() public method

public Append ( byte payload ) : void
payload byte
return void

Dispose() public method

public Dispose ( ) : void
return void

Flush() public method

public Flush ( bool flushOnDisk ) : void
flushOnDisk bool
return void

ReadMessagesBlock() public method

Read bytes, starting from byte from specified and
public ReadMessagesBlock ( Int32 offset, Int32 blockLength ) : MessagesBlock
offset System.Int32
blockLength System.Int32
return Brod.Messages.MessagesBlock

Segment() public method

public Segment ( String logDirectory, System.Int64 offset ) : System
logDirectory String
offset System.Int64
return System