Type Alias LockProviderSettingsBase

LockProviderSettingsBase: {
    createLockId?: Invokable<[], string>;
    defaultBlockingInterval?: ITimeSpan;
    defaultBlockingTime?: ITimeSpan;
    defaultRefreshTime?: ITimeSpan;
    defaultTtl?: ITimeSpan | null;
    eventBus?: IEventBus;
    namespace?: Namespace;
    serde: OneOrMore<ISerderRegister>;
    serdeTransformerName?: string;
}

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

Type declaration

  • OptionalcreateLockId?: Invokable<[], string>

    You can pass your lock id id generator function.

  • OptionaldefaultBlockingInterval?: ITimeSpan

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

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

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

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

    The default refresh time used in the ILock referesh method.

    TimeSpan.fromMinutes(5);
    
  • OptionaldefaultTtl?: ITimeSpan | 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?: IEventBus
    import { EventBus } from "@daiso-tech/core/event-bus";
    import { MemoryEventBusAdapter } from "@daiso-tech/core/event-bus/memory-event-bus-adapter";

    new EventBus({
    adapter: new MemoryEventBusAdapter()
    })
  • Optionalnamespace?: Namespace
    import { Namespace } from "@daiso-tech/core/namespace";

    new Namespace("@lock")
  • serde: OneOrMore<ISerderRegister>
  • OptionalserdeTransformerName?: string
    ""