Optionalcontext?: IReadableContextYou can pass IReadableContext that will be used by context-aware adapters.
OptionalcreateLockId?: Invokable<[], string>You can pass your own lock id generator function.
OptionaldefaultRefreshTime?: ITimeSpanThe default refresh time used in the ISharedLock refresh method.
import { TimeSpan } from "@daiso-tech/core/time-span";
TimeSpan.fromMinutes(5);
OptionaldefaultTtl?: ITimeSpan | nullYou can decide the default ttl value for ISharedLock expiration. If null is passed then no ttl will be used by default.
Optionalserde?: OneOrMore<ISerderRegister>You can pass an ISerderRegister instance to the SharedLockFactory to register the shared lock's serialization and deserialization logic for the provided adapter.
OptionalserdeTransformerName?: stringThe serde transformer name used to identify shared-lock serializer and deserializer adapters when there are adapters with the same name.
Base configuration shared by all
SharedLockFactoryvariants.IMPORT_PATH:
"@daiso-tech/core/shared-lock"