C# Class Brod.Storage.Store

Brod persistent message store
Inheritance: IDisposable
Afficher le fichier Open project: paralect/brod Class Usage Examples

Méthodes publiques

Méthode Description
Append ( String topic, Int32 partition, byte payload ) : void

Append payload to specified topic and partition

Dispose ( ) : void
Flush ( ) : void

Flush to OS page cache (data will be visible for consumers)

FlushOnDisk ( ) : void

Flush on disk to store data permanently

GetNumberOfPartitionsForTopic ( String topic ) : Int32

Calculates number of partitions for specified topic

ReadMessages ( String topic, Int32 partition, Int32 offset, Int32 blockLength ) : IEnumerable

Read and parse all message that can be found in bytes, starting from byte from specified and

ReadMessagesBlock ( String topic, Int32 partition, Int32 offset, Int32 blockLength ) : MessagesBlock

Read bytes, starting from byte from specified and

Store ( BrokerConfiguration configuration ) : System

Creates Store

ValidatePartitionNumber ( String topic, Int32 partition ) : bool

Returns true of partition number is valid for current broker configuration

Private Methods

Méthode Description
GetTopic ( String topicName ) : Topic

Returns Topic for specified name. Will be created, if not exists.

Init ( ) : void

Builds internal cache of topics, that this storage contains

InternalFlush ( System.Boolean flushToDisk ) : void

Flush streams to page cache or disk, depending on param.

Method Details

Append() public méthode

Append payload to specified topic and partition
public Append ( String topic, Int32 partition, byte payload ) : void
topic String
partition System.Int32
payload byte
Résultat void

Dispose() public méthode

public Dispose ( ) : void
Résultat void

Flush() public méthode

Flush to OS page cache (data will be visible for consumers)
public Flush ( ) : void
Résultat void

FlushOnDisk() public méthode

Flush on disk to store data permanently
public FlushOnDisk ( ) : void
Résultat void

GetNumberOfPartitionsForTopic() public méthode

Calculates number of partitions for specified topic
public GetNumberOfPartitionsForTopic ( String topic ) : Int32
topic String
Résultat System.Int32

ReadMessages() public méthode

Read and parse all message that can be found in bytes, starting from byte from specified and
public ReadMessages ( String topic, Int32 partition, Int32 offset, Int32 blockLength ) : IEnumerable
topic String
partition System.Int32
offset System.Int32
blockLength System.Int32
Résultat IEnumerable

ReadMessagesBlock() public méthode

Read bytes, starting from byte from specified and
public ReadMessagesBlock ( String topic, Int32 partition, Int32 offset, Int32 blockLength ) : MessagesBlock
topic String
partition System.Int32
offset System.Int32
blockLength System.Int32
Résultat Brod.Messages.MessagesBlock

Store() public méthode

Creates Store
public Store ( BrokerConfiguration configuration ) : System
configuration Brod.Brokers.BrokerConfiguration
Résultat System

ValidatePartitionNumber() public méthode

Returns true of partition number is valid for current broker configuration
public ValidatePartitionNumber ( String topic, Int32 partition ) : bool
topic String
partition System.Int32
Résultat bool