Table of Contents

Interface IInMemoryCdcBuilder

Namespace
Excalibur.Cdc.InMemory
Assembly
Excalibur.Cdc.dll

Fluent builder interface for configuring in-memory CDC settings.

public interface IInMemoryCdcBuilder

Examples

cdc.UseInMemory(mem =>
{
    mem.ProcessorId("test-processor")
       .BatchSize(10)
       .PreserveHistory(true);
});

Remarks

This builder configures in-memory CDC options for testing scenarios. All methods return this for method chaining.

Methods

AutoFlush(bool)

Sets whether to automatically flush changes after each batch.

IInMemoryCdcBuilder AutoFlush(bool autoFlush = true)

Parameters

autoFlush bool

Whether to auto-flush.

Returns

IInMemoryCdcBuilder

The builder for fluent chaining.

Remarks

Default is true.

BatchSize(int)

Sets the batch size for CDC change processing.

IInMemoryCdcBuilder BatchSize(int size)

Parameters

size int

The batch size.

Returns

IInMemoryCdcBuilder

The builder for fluent chaining.

Remarks

Default is 100.

Exceptions

ArgumentOutOfRangeException

Thrown when size is not positive.

PreserveHistory(bool)

Sets whether to preserve changes in history after processing.

IInMemoryCdcBuilder PreserveHistory(bool preserveHistory = true)

Parameters

preserveHistory bool

Whether to preserve history.

Returns

IInMemoryCdcBuilder

The builder for fluent chaining.

Remarks

Default is false. Enable this to access processed changes via GetHistory().

ProcessorId(string)

Sets the processor identifier for this CDC processor instance.

IInMemoryCdcBuilder ProcessorId(string processorId)

Parameters

processorId string

The processor identifier.

Returns

IInMemoryCdcBuilder

The builder for fluent chaining.

Remarks

Default is "inmemory-cdc".

Exceptions

ArgumentException

Thrown when processorId is null or whitespace.