MemorySessionProvider
Axis Vertex JavaScript SDK: core
Axis Vertex JavaScript SDK: core / server / MemorySessionProvider
Class: MemorySessionProvider
Every mutation is atomic across the provider's declared scope. compareAndSet never inserts an absent/expired record, and binds the complete expected version/owner/fence. invalidate must fence outstanding writers. Storage faults throw BffError; null means only absent/expired.
Implements
Constructors
Constructor
new MemorySessionProvider(
config?):MemorySessionProvider
Parameters
config?
MemorySessionProviderConfig = {}
Returns
MemorySessionProvider
Properties
scope
readonlyscope:"process"
Implementation of
Methods
close()
close():
Promise<void>
Returns
Promise<void>
Implementation of
compareAndSet()
compareAndSet(
id,expected,replacement):Promise<ProviderResult>
Parameters
id
string
expected
replacement
Returns
Promise<ProviderResult>
Implementation of
BffSessionProvider.compareAndSet
create()
create(
id,record):Promise<ProviderResult>
Parameters
id
string
record
Returns
Promise<ProviderResult>
Implementation of
invalidate()
invalidate(
id):Promise<BffRecord|null>
Parameters
id
string
Returns
Promise<BffRecord | null>
Implementation of
read()
read(
id):Promise<BffRecord|null>
Parameters
id
string
Returns
Promise<BffRecord | null>
Implementation of
rotate()
rotate(
id,expected,nextId,session):Promise<ProviderResult>
Atomically consumes expected prelogin and creates a new session ID.
Parameters
id
string
expected
nextId
string
session
Returns
Promise<ProviderResult>