C# 클래스 Brod.Storage.Store

Brod persistent message store
상속: IDisposable
파일 보기 프로젝트 열기: paralect/brod 1 사용 예제들

공개 메소드들

메소드 설명
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