C# Класс Brod.Storage.Store

Brod persistent message store
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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.

Описание методов

Append() публичный Метод

Append payload to specified topic and partition
public Append ( String topic, Int32 partition, byte payload ) : void
topic String
partition System.Int32
payload byte
Результат void

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

Flush() публичный Метод

Flush to OS page cache (data will be visible for consumers)
public Flush ( ) : void
Результат void

FlushOnDisk() публичный Метод

Flush on disk to store data permanently
public FlushOnDisk ( ) : void
Результат void

GetNumberOfPartitionsForTopic() публичный Метод

Calculates number of partitions for specified topic
public GetNumberOfPartitionsForTopic ( String topic ) : Int32
topic String
Результат System.Int32

ReadMessages() публичный Метод

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
Результат IEnumerable

ReadMessagesBlock() публичный Метод

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
Результат Brod.Messages.MessagesBlock

Store() публичный Метод

Creates Store
public Store ( BrokerConfiguration configuration ) : System
configuration Brod.Brokers.BrokerConfiguration
Результат System

ValidatePartitionNumber() публичный Метод

Returns true of partition number is valid for current broker configuration
public ValidatePartitionNumber ( String topic, Int32 partition ) : bool
topic String
partition System.Int32
Результат bool