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 ILock refresh method.
import { TimeSpan } from "@daiso-tech/core/time-span";
TimeSpan.fromMinutes(5);
OptionaldefaultTtl?: ITimeSpan | nullYou can decide the default ttl value for ILock expiration. If null is passed then no ttl will be used by default.
Optionalserde?: OneOrMore<ISerderRegister>You can pass an ISerderRegister instance to the LockFactory to register the lock's serialization and deserialization logic for the provided adapter.
OptionalserdeTransformerName?: stringThe registered serde transformer name used to identify lock serializer and deserializer adapters when there are adapters with the same name.
Base configuration shared by all
LockFactoryvariants.IMPORT_PATH:
"@daiso-tech/core/lock"