C# 클래스 Akka.Persistence.Sql.Common.Journal.JournalDbEngine

Class used to abstract SQL persistence capabilities for concrete implementation of actor journal.
상속: IDisposable
파일 보기 프로젝트 열기: rogeralsing/akka.net 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Settings JournalSettings

보호된 프로퍼티들

프로퍼티 타입 설명
TimestampProvider ITimestampProvider

공개 메소드들

메소드 설명
Close ( ) : void

Closes database connection if exists.

CreateDbConnection ( ) : DbConnection
DeleteMessagesToAsync ( string persistenceId, long toSequenceNr ) : Task

Asynchronously deletes all persisted messages identified by provided persistenceId up to provided message sequence number (inclusive).

ReadEvents ( object queryId, IEnumerable hints, IActorRef sender, Action replayCallback ) : Task

Performs

ReadHighestSequenceNrAsync ( string persistenceId, long fromSequenceNr ) : Task

Asynchronously reads a highest sequence number of the event stream related with provided persistenceId.

ReplayMessagesAsync ( string persistenceId, long fromSequenceNr, long toSequenceNr, long max, IActorRef sender, Action recoveryCallback ) : Task

Asynchronously replays all requested messages related to provided persistenceId, using provided sequence ranges (inclusive) with max number of messages replayed (counting from the beginning). Replay callback is invoked for each replayed message.

WriteMessagesAsync ( IEnumerable messages ) : Task>

Asynchronously writes all persistent messages inside SQL Server database. Specific table used for message persistence may be defined through configuration within 'akka.persistence.journal.sql-server' scope with 'schema-name' and 'table-name' keys.

보호된 메소드들

메소드 설명
CopyParamsToCommand ( DbCommand sqlCommand, JournalEntry entry ) : void

Copies values from entities to database command.

CreateDbConnection ( string connectionString ) : DbConnection

Initializes a database connection.

GetConnectionString ( ) : string

Returns connection string from either HOCON configuration or <connectionStrings> section of app.config.

JournalDbEngine ( ActorSystem system ) : System

비공개 메소드들

메소드 설명
CompleteCommand ( DbCommand sqlCommand, DbConnection connection ) : void
CreateTimestampProvider ( ) : ITimestampProvider
IDisposable ( ) : void
InsertInTransactionAsync ( DbCommand sqlCommand, IEnumerable journalEntries ) : Task
ToJournalEntry ( IPersistentRepresentation message ) : JournalEntry
TryUnwrapException ( Exception e ) : Exception

메소드 상세

Close() 공개 메소드

Closes database connection if exists.
public Close ( ) : void
리턴 void

CopyParamsToCommand() 보호된 추상적인 메소드

Copies values from entities to database command.
protected abstract CopyParamsToCommand ( DbCommand sqlCommand, JournalEntry entry ) : void
sqlCommand System.Data.Common.DbCommand
entry JournalEntry
리턴 void

CreateDbConnection() 공개 메소드

public CreateDbConnection ( ) : DbConnection
리턴 System.Data.Common.DbConnection

CreateDbConnection() 보호된 추상적인 메소드

Initializes a database connection.
protected abstract CreateDbConnection ( string connectionString ) : DbConnection
connectionString string
리턴 System.Data.Common.DbConnection

DeleteMessagesToAsync() 공개 메소드

Asynchronously deletes all persisted messages identified by provided persistenceId up to provided message sequence number (inclusive).
public DeleteMessagesToAsync ( string persistenceId, long toSequenceNr ) : Task
persistenceId string
toSequenceNr long
리턴 Task

GetConnectionString() 보호된 메소드

Returns connection string from either HOCON configuration or <connectionStrings> section of app.config.
protected GetConnectionString ( ) : string
리턴 string

JournalDbEngine() 보호된 메소드

protected JournalDbEngine ( ActorSystem system ) : System
system ActorSystem
리턴 System

ReadEvents() 공개 메소드

Performs
public ReadEvents ( object queryId, IEnumerable hints, IActorRef sender, Action replayCallback ) : Task
queryId object
hints IEnumerable
sender IActorRef
replayCallback Action
리턴 Task

ReadHighestSequenceNrAsync() 공개 메소드

Asynchronously reads a highest sequence number of the event stream related with provided persistenceId.
public ReadHighestSequenceNrAsync ( string persistenceId, long fromSequenceNr ) : Task
persistenceId string
fromSequenceNr long
리턴 Task

ReplayMessagesAsync() 공개 메소드

Asynchronously replays all requested messages related to provided persistenceId, using provided sequence ranges (inclusive) with max number of messages replayed (counting from the beginning). Replay callback is invoked for each replayed message.
public ReplayMessagesAsync ( string persistenceId, long fromSequenceNr, long toSequenceNr, long max, IActorRef sender, Action recoveryCallback ) : Task
persistenceId string Identifier of persistent messages stream to be replayed.
fromSequenceNr long Lower inclusive sequence number bound. Unbound by default.
toSequenceNr long Upper inclusive sequence number bound. Unbound by default.
max long Maximum number of messages to be replayed. Unbound by default.
sender IActorRef
recoveryCallback Action Action invoked for each replayed message.
리턴 Task

WriteMessagesAsync() 공개 메소드

Asynchronously writes all persistent messages inside SQL Server database. Specific table used for message persistence may be defined through configuration within 'akka.persistence.journal.sql-server' scope with 'schema-name' and 'table-name' keys.
public WriteMessagesAsync ( IEnumerable messages ) : Task>
messages IEnumerable
리턴 Task>

프로퍼티 상세

Settings 공개적으로 프로퍼티

Settings applied to journal mapped from HOCON config file.
public JournalSettings Settings
리턴 JournalSettings

TimestampProvider 보호되어 있는 프로퍼티

Timestamp provider used for generation of timestamps for incoming persistent messages.
protected ITimestampProvider TimestampProvider
리턴 ITimestampProvider