Type Alias LockProviderSettings

LockProviderSettings: {
    adapter: ILockAdapter | IDatabaseLockAdapter;
    backoffPolicy?: BackoffPolicy | null;
    createOwnerId?: (() => string);
    defaultBlockingInterval?: TimeSpan;
    defaultBlockingTime?: TimeSpan;
    defaultRefreshTime?: TimeSpan;
    defaultTtl?: TimeSpan | null;
    eventBus?: IGroupableEventBus<any>;
    retryAttempts?: number | null;
    retryPolicy?: RetryPolicy | null;
    serde: OneOrMore<IFlexibleSerde>;
    timeout?: TimeSpan | null;
}

IMPORT_PATH: "@daiso-tech/core/lock/implementations/derivables"

Type declaration

  • adapter: ILockAdapter | IDatabaseLockAdapter
  • OptionalbackoffPolicy?: BackoffPolicy | null

    The default backof policy to use in the returned LazyPromise.

    {null}
    
  • OptionalcreateOwnerId?: (() => string)

    You can pass your owner id generator function.

      • (): string
      • Returns string

  • OptionaldefaultBlockingInterval?: TimeSpan

    The default refresh time used in the ILock acquireBlocking and runBlocking methods.

    TimeSpan.fromSeconds(1);
    
  • OptionaldefaultBlockingTime?: TimeSpan

    The default refresh time used in the ILock acquireBlocking and runBlocking methods.

    TimeSpan.fromMinutes(1);
    
  • OptionaldefaultRefreshTime?: TimeSpan

    The default refresh time used in the ILock extend method.

    TimeSpan.fromMinutes(5);
    
  • OptionaldefaultTtl?: TimeSpan | null

    You can decide the default ttl value for ILock expiration. If null is passed then no ttl will be used by default.

    TimeSpan.fromMinutes(5);
    
  • OptionaleventBus?: IGroupableEventBus<any>
    new EventBus({
    adapter: new MemoryEventBusAdapter({
    rootGroup: "@global"
    })
    })
  • OptionalretryAttempts?: number | null

    The default retry attempt to use in the returned LazyPromise.

    {null}
    
  • OptionalretryPolicy?: RetryPolicy | null

    The default retry policy to use in the returned LazyPromise.

    {null}
    
  • serde: OneOrMore<IFlexibleSerde>
  • Optionaltimeout?: TimeSpan | null

    The default timeout to use in the returned LazyPromise.

    {null}